Ejemplo n.º 1
0
 public void PropertyWithAttributes_HasAttributes()
 {
     var property = new PropertyInfoWrapper(typeof(ContainerClass).GetProperties().Single(x => x.Name == "PublicPropertyWithAttributes"));
     var SUT = new PropertyData(property);
     Assert.That(SUT.AttributeData.Count > 0);
     Assert.That(SUT.AttributeData.Any(x => x.Name == typeof(TestAttributeAttribute).FullName));
 }
Ejemplo n.º 2
0
 public void PublicPropertyDataFromString_IsPublic()
 {
     var testString = "\t\tVoid TestField { public get; public set; }";
     var propertyData = new PropertyData(testString);
     Assert.That(propertyData.GetterAccessLevel == AccessLevelEnum.Public);
 }
Ejemplo n.º 3
0
 public void PublicPropertyAccessLevel_IsPublic()
 {
     var property = new PropertyInfoWrapper(typeof(ContainerClass).GetProperties().Single(x => x.Name == "PublicPropertyWithAttributes"));
     var SUT = new PropertyData(property);
     Assert.That(SUT.GetterAccessLevel == AccessLevelEnum.Public);
 }
Ejemplo n.º 4
0
 public void ProtectedPropertyDataFromString_IsProtected()
 {
     var testString = "\t\tVoid TestField { protected get; protected set; }";
     var propertyData = new PropertyData(testString);
     Assert.That(propertyData.GetterAccessLevel == AccessLevelEnum.Protected);
 }
Ejemplo n.º 5
0
 public void InternalPropertyDataFromString_IsInternal()
 {
     var testString = "\t\tVoid TestField { internal get; internal set; }";
     var propertyData = new PropertyData(testString);
     Assert.That(propertyData.GetterAccessLevel == AccessLevelEnum.Internal);
 }