1 // Copyright 2004-2007 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle
.ActiveRecord
.Framework
.Internal
.Tests
.Model
17 using NUnit
.Framework
;
20 public class PropertyAccessHelperTests
23 public void Property()
25 Assert
.AreEqual("property", PropertyAccessHelper
.ToString(PropertyAccess
.Property
));
31 Assert
.AreEqual("field", PropertyAccessHelper
.ToString(PropertyAccess
.Field
));
35 public void FieldCamelCase()
37 Assert
.AreEqual("field.camelcase", PropertyAccessHelper
.ToString(PropertyAccess
.FieldCamelcase
));
41 public void FieldCamelCaseUnderscore()
43 Assert
.AreEqual("field.camelcase-underscore", PropertyAccessHelper
.ToString(PropertyAccess
.FieldCamelcaseUnderscore
));
47 public void FieldLowerCaseUnderscore()
49 Assert
.AreEqual("field.lowercase-underscore", PropertyAccessHelper
.ToString(PropertyAccess
.FieldLowercaseUnderscore
));
53 public void FieldPascalCase_M_Underscore()
55 Assert
.AreEqual("field.pascalcase-m-underscore", PropertyAccessHelper
.ToString(PropertyAccess
.FieldPascalcaseMUnderscore
));
59 public void NoSetterCamelCase()
61 Assert
.AreEqual("nosetter.camelcase", PropertyAccessHelper
.ToString(PropertyAccess
.NosetterCamelcase
));
65 public void NoSetterCamelCaseUnderscore()
67 Assert
.AreEqual("nosetter.camelcase-underscore", PropertyAccessHelper
.ToString(PropertyAccess
.NosetterCamelcaseUnderscore
));
71 public void NoSetterLowerCaseUnderscore()
73 Assert
.AreEqual("nosetter.lowercase-underscore", PropertyAccessHelper
.ToString(PropertyAccess
.NosetterLowercaseUnderscore
));
77 public void NoSetterPascalCase_M_Underscore()
79 Assert
.AreEqual("nosetter.pascalcase-m-underscore", PropertyAccessHelper
.ToString(PropertyAccess
.NosetterPascalcaseMUndersc
));