Esempio n. 1
0
        public void CreateStructure_When_structure_has_null_collection_It_should_create_structure_with_index_for_other_members()
        {
            Builder = StructureBuilder.Create(c => c.Register <WithNullCollection>());
            var item = new WithNullCollection {
                Temp = "Foo", Values = null
            };

            var structure = Builder.CreateStructure(item);

            Assert.AreEqual(1, structure.Indexes.Count);
            Assert.AreEqual("Temp", structure.Indexes[0].Path);
        }
Esempio n. 2
0
        public void CreateStructure_When_structure_has_null_collection_It_should_create_structure_with_index_for_other_members()
        {
            var schema = StructureSchemaTestFactory.CreateRealFrom <WithNullCollection>();
            var item   = new WithNullCollection {
                Temp = "Foo", Values = null
            };

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

            Assert.AreEqual(2, structure.Indexes.Count);
            Assert.AreEqual("StructureId", structure.Indexes[0].Path);
            Assert.AreEqual("Temp", structure.Indexes[1].Path);
        }
        public void CreateStructure_When_structure_has_null_collection_It_should_create_structure_with_index_for_other_members()
        {
            var schema = StructureSchemaTestFactory.CreateRealFrom<WithNullCollection>();
            var item = new WithNullCollection {Temp = "Foo", Values = null};

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

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