Example #1
0
        public void CreateStructure_WhenChildItemWithInheritedNullablesHasNullValues_NoIndexesAreCreated()
        {
            Builder = StructureBuilder.Create(c => c.Register <ChildWithNullables>());
            var item = ChildWithNullables.CreateWithNullValues();

            var structure = Builder.CreateStructure(item);

            structure.Indexes.Should().BeEmpty();
        }
        public void CreateStructure_WhenChildItemWithInheritedNullablesHasNullValues_IndexesAreCreated()
        {
            var schema = StructureSchemaTestFactory.CreateRealFrom <ChildWithNullables>();
            var item   = ChildWithNullables.CreateWithNullValues();

            var structure = Builder.CreateStructure(item, schema);

            Assert.AreEqual(1, structure.Indexes.Count);
            Assert.AreEqual("StructureId", structure.Indexes[0].Path);
        }