public void Then_property_infos_should_not_be_null_or_empty(bool inherit)
        {
            When_getting_properties_with_specific_attribute_for_type <SampleParent, MyAttribute>(inherit);

            PropertesWithAttribute.ShouldNotBeNull();
            PropertesWithAttribute.ShouldNotBeEmpty();
        }
        public void Then_correct_attributes_should_have_been_returned(bool inherit)
        {
            When_getting_properties_with_specific_attribute_for_type <SampleParent, MyAttribute>(inherit);

            PropertesWithAttribute.Single(p => p.Name.Equals("ParentId"))
            .GetCustomAttribute <MyAttribute>()
            .Name.ShouldBe("_parentId");
        }
示例#3
0
        public void Then_correct_attributes_should_have_been_returned()
        {
            PropertesWithAttribute.Single(p => p.Name.Equals("ChildId"))
            .GetCustomAttribute <MyAttribute>()
            .Name.ShouldBe("_childId");

            PropertesWithAttribute.Single(p => p.Name.Equals("ChildAge"))
            .GetCustomAttribute <MyAttribute>()
            .Name.ShouldBe("_childAge");
        }
示例#4
0
 public void Then_property_infos_should_have_correct_count()
 {
     PropertesWithAttribute.Count().ShouldBe(2);
 }
示例#5
0
 public void Then_property_infos_should_not_be_null_or_empty()
 {
     PropertesWithAttribute.ShouldNotBeNull();
     PropertesWithAttribute.ShouldNotBeEmpty();
 }
        public void Then_property_infos_should_have_correct_count(bool inherit)
        {
            When_getting_properties_with_specific_attribute_for_type <SampleParent, MyAttribute>(inherit);

            PropertesWithAttribute.Count().ShouldBe(1);
        }