Esempio n. 1
0
        public void GetPersons_Test()
        {
            var persister = new PersonPersister();

            var sw = Stopwatch.StartNew();
            var runs = persister.GetPersons();
            sw.Stop();
            Console.WriteLine("time: {0}", sw.ElapsedMilliseconds);

            Assert.IsTrue(runs.Count > 0);
            Console.WriteLine("SnapRun count: {0}", runs.Count);
            ObjectDumper.Write(runs, 3);
        }
Esempio n. 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);
        }