Exemple #1
0
        public void after_Add_getChangeSet_contains_change()
        {
            IChangeTrackingService svc = new ChangeTrackingService();

            PersonCollection p = new PersonCollection(svc);

            p.Add(new Person(svc, false));
            p.Add(new Person(svc, false));

            IChangeSet cSet = svc.GetChangeSet();

            cSet.Count.Should().Be.EqualTo(2);
        }
Exemple #2
0
        public void service_getChangeSet_returns_valid_cSet()
        {
            int expected = 3;
            int actual   = 0;

            ChangeTrackingService svc = new ChangeTrackingService();

            PersonCollection p = new PersonCollection(svc);

            p.Add(new Person(null, false));
            p.Add(new Person(null, false));
            p.Move(0, 1);

            IChangeSet cSet = svc.GetChangeSet();

            actual = cSet.Count;

            Assert.AreEqual <int>(expected, actual);
        }