public void CreateStructure_WhenNestedStructureExists_NestedStructureWillNotBePartOfStructure() { var schema = StructureSchemaTestFactory.CreateRealFrom<Structure1>(); var item = new Structure1 { IntOnStructure1 = 142, Nested = new Structure2 { IntOnStructure2 = 242 } }; var structure = Builder.CreateStructure(item, schema); Assert.AreEqual(2, structure.Indexes.Count); Assert.AreEqual("StructureId", structure.Indexes[0].Path); Assert.AreEqual("IntOnStructure1", structure.Indexes[1].Path); }
public void CreateStructure_WhenNestedStructureExists_NestedStructureWillBePartOfStructure() { var schema = StructureSchemaTestFactory.CreateRealFrom <Structure1>(); var item = new Structure1 { IntOnStructure1 = 142, Nested = new Structure2 { IntOnStructure2 = 242 } }; var structure = Builder.CreateStructure(item, schema); Assert.AreEqual(4, structure.Indexes.Count); Assert.AreEqual("StructureId", structure.Indexes[0].Path); Assert.AreEqual("IntOnStructure1", structure.Indexes[1].Path); Assert.AreEqual("Nested.StructureId", structure.Indexes[2].Path); Assert.AreEqual("Nested.IntOnStructure2", structure.Indexes[3].Path); }