Пример #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));
 }
Пример #2
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);
 }