Esempio n. 1
0
 public void FieldWithAttributes_HasAttributes()
 {
     var field = new FieldInfoWrapper(typeof(ContainerClass).GetFields().Single(x => x.Name == "PublicFieldWithAttributes"));
     var SUT = new FieldData(field);
     Assert.That(SUT.AttributeData.Count > 0);
     Assert.That(SUT.AttributeData.Any(x => x.Name == typeof(TestAttributeAttribute).FullName));
 }
Esempio n. 2
0
 public void PublicFieldDataFromString_IsPublic()
 {
     var testString = "\t\tpublic Void TestField";
     var fieldData = new FieldData(testString);
     Assert.That(fieldData.AccessLevel == AccessLevelEnum.Public);
 }
Esempio n. 3
0
 public void PublicFieldAccessLevel_IsPublic()
 {
     var field = new FieldInfoWrapper(typeof(ContainerClass).GetFields().Single(x => x.Name == "PublicFieldWithAttributes"));
     var SUT = new FieldData(field);
     Assert.That(SUT.AccessLevel == AccessLevelEnum.Public);
 }
Esempio n. 4
0
 public void ProtectedFieldDataFromString_IsProtected()
 {
     var testString = "\t\tprotected Void TestField";
     var fieldData = new FieldData(testString);
     Assert.That(fieldData.AccessLevel == AccessLevelEnum.Protected);
 }
Esempio n. 5
0
 public void PrivateFieldDataFromString_IsPrivate()
 {
     var testString = "\t\tprivate Void TestField";
     var fieldData = new FieldData(testString);
     Assert.That(fieldData.AccessLevel == AccessLevelEnum.Private);
 }
Esempio n. 6
0
 public void InternalFieldDataFromString_IsInternal()
 {
     var testString = "\t\tinternal Void TestField";
     var fieldData = new FieldData(testString);
     Assert.That(fieldData.AccessLevel == AccessLevelEnum.Internal);
 }