public void UnitOfWork_OneFeatureMultipleActions_Test() { IWorkspace wks = GetGeodatabase(); uw = new UnitOfWork(wks, true); IActiveRecord record = new ActiveRecordMock(); uw.Create(record); uw.Update(record); uw.Delete(record); Assert.AreEqual(1, uw.Created.Count); Assert.AreEqual(1, uw.Updated.Count); Assert.AreEqual(1, uw.Deleted.Count); uw.Commit(); Assert.AreEqual(0, uw.Created.Count); Assert.AreEqual(0, uw.Updated.Count); Assert.AreEqual(0, uw.Deleted.Count); Assert.Inconclusive(); }
public void UnitOfWork_Update_Test() { IWorkspace wks = GetGeodatabase(); uw = new UnitOfWork(wks, true); IActiveRecord record = new EspacoAereoTests.Model.ActiveRecordMock(); uw.Update(record); Assert.AreEqual(1, uw.Updated); }