Beispiel #1
0
        public void IsNotDirtyIfDoesNotHaveDirtyProps()
        {
            var foo = new Foo(new string[0], new Dictionary <string, object>())
            {
                Name = "James"
            };
            var inspector = new TrackedEntityInspector <Foo>(foo);

            Assert.False(inspector.IsDirty());
        }
Beispiel #2
0
        public void IsDirtyIfHasDirtyProps()
        {
            var foo = new Foo(new[] { "Name" }, new Dictionary <string, object> {
                { "Name", "Mark" }
            })
            {
                Name = "James"
            };
            var inspector = new TrackedEntityInspector <Foo>(foo);

            Assert.True(inspector.IsDirty());
        }