コード例 #1
0
        public void Should_ignore_overriden_parent_properties()
        {
            // given
            PropertyInfo property = new TestPropertyInfo(GetType());
            var child = new
                          {
                              EntityType = typeof(IDerivedLevel2),
                              Properties = CreateProperty(property, new Uri("urn:in:child")).AsEnumerable(),
                          }.ActLike<IEntityMappingProvider>();
            var parent = new
                           {
                               EntityType = typeof(IDerived),
                               Properties = CreateProperty(property, new Uri("urn:in:parent")).AsEnumerable()
                           }.ActLike<IEntityMappingProvider>();

            // when
            var provider = new InheritanceTreeProvider(child, parent.AsEnumerable());

            // then
            provider.Properties.Should().HaveCount(1);
            provider.Properties.Single().GetTerm(_ontology).Should().Be(new Uri("urn:in:child"));
        }
コード例 #2
0
 public void Setup()
 {
     _provider = new TestingInheritanceTreeProvider();
 }