public void TestRejectChangesOnEntity1() { aggTest = new AggregateTest(); aggTest.FirstName = "Mike"; aggTest.RejectChanges(); Assert.IsFalse(aggTest.es.IsAdded); Assert.IsFalse(aggTest.es.IsDeleted); Assert.IsFalse(aggTest.es.IsModified); Assert.IsFalse(aggTest.es.IsDirty); Assert.IsTrue(aggTest.es.ModifiedColumns.Count == 0); Assert.IsTrue(aggTest.es.RowState == esDataRowState.Unchanged); }
public void TestRejectChangesOnCollection2() { aggTestColl = new AggregateTestCollection(); AggregateTest aggTest = aggTestColl.AddNew(); aggTest.FirstName = "Mike"; aggTestColl.AcceptChanges(); Assert.IsFalse(aggTestColl.IsDirty); aggTest.FirstName = "Joe"; aggTest.RejectChanges(); Assert.IsFalse(aggTestColl.IsDirty); }