public void TestGetChanges()
        {
            var changes = _sample.GetChanges(_sample2);

            Assert.Empty(changes);

            _sample2.Name = "a";
            changes       = _sample.GetChanges(_sample2);
            Assert.Single(changes);
            Assert.Equal("", changes[0].OldValue);
            Assert.Equal("a", changes[0].NewValue);

            _sample.Name = "a";
            changes      = _sample.GetChanges(_sample2);
            Assert.Empty(changes);
        }
Beispiel #2
0
        public void TestGetChanges()
        {
            var changes = _sample.GetChanges(_sample2);

            Assert.Equal(0, changes.Count);

            _sample2.Name = "a";
            changes       = _sample.GetChanges(_sample2);
            Assert.Equal(1, changes.Count);
            Assert.Equal("", changes[0].OldValue);
            Assert.Equal("a", changes[0].NewValue);

            _sample.Name = "a";
            changes      = _sample.GetChanges(_sample2);
            Assert.Equal(0, changes.Count);
        }