Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }