Exemple #1
0
        public void AutoInsert()
        {
            var newNames = new TestEntity[]{
                new TestEntity("testName1"),
                new TestEntity("testName2"),
                new TestEntity("testName3"),
                new TestEntity("testName4"),
                new TestEntity("testName5")
            };

            d.Insert(newNames, false);

            var foundNames = d.GetNames()
                .Where(n => n.name.StartsWith("testName"))
                .OrderBy(n => n.name)
                .ToArray();

            Assert.AreEqual(newNames.Length, foundNames.Length);
            for (var i = 0; i < newNames.Length; ++i)
            {
                Assert.AreEqual(newNames[i].name, foundNames[i].name);
            }
        }
Exemple #2
0
        public void AutoInsert()
        {
            var newNames = new TestEntity[] {
                new TestEntity("testName1"),
                new TestEntity("testName2"),
                new TestEntity("testName3"),
                new TestEntity("testName4"),
                new TestEntity("testName5")
            };

            d.Insert(newNames, false);

            var foundNames = d.GetNames()
                             .Where(n => n.name.StartsWith("testName"))
                             .OrderBy(n => n.name)
                             .ToArray();

            Assert.AreEqual(newNames.Length, foundNames.Length);
            for (var i = 0; i < newNames.Length; ++i)
            {
                Assert.AreEqual(newNames[i].name, foundNames[i].name);
            }
        }