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");
        }
示例#2
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");
        }