Пример #1
0
        public void GetPersons_Test()
        {
            var persister = new PersonPersister();

            var runs = persister.GetPersons();

            Assert.IsTrue(runs.Count > 0);
            Console.WriteLine("SnapRun count: {0}", runs.Count);
            ObjectDumper.Write(runs, 3);
        }
Пример #2
0
        public void SavePerson_Test()
        {
            var persister = new PersonPersister();

            var person = new Person()
            {
                Id = 8,
                FirstName = "AA1",
                LastName = "BBB",
                //EyeColor = new EyeColor() { Name = "Brown" },
                HairColor = new HairColor() {Color = "BB7"},
                EyeColorId = 1,
            };

            var sw = Stopwatch.StartNew();
            persister.SavePerson(person);
            sw.Stop();
            //Assert.IsTrue(runs.Count > 0);
            Console.WriteLine("time: {0}", sw.ElapsedMilliseconds);
            ObjectDumper.Write(person, 3);
        }