public void GuidTest() { TestGuidRecord record = TestData.CreateTestGuidRecord("test"); Assert.IsTrue(DbTestUtils.SaveTest(record)); var recordLoaded = gateway.Load <TestGuidRecord>(record.Guid); assert(record, recordLoaded); record.Title = "test2"; Assert.IsTrue(DbTestUtils.UpdateTest(record)); var workLog2 = gateway.Load <TestGuidRecord>(record.Guid); Assert.IsNotNull(workLog2); assert(record, workLog2); var workLog3 = new TestGuidRecord(); Assert.IsTrue(gateway.Load(workLog3, "Guid", record.Guid)); assert(record, workLog3); DbTestUtils.DeleteTest(record); Assert.IsNull(gateway.Load <TestGuidRecord>(record.Guid)); }
public void GatewayCoreTest() { var workLog = TestData.CreateWorkLog("Test"); DbTestUtils.SaveTest(workLog); workLog.Description = "test2"; DbTestUtils.UpdateTest(workLog); var workLog2 = gateway.Load <WorkLog>(workLog.Id); AssertWorkLog(workLog, workLog2); var workLog3 = new WorkLog(); Assert.IsTrue(gateway.Load(workLog3, "Id", workLog.Id)); AssertWorkLog(workLog, workLog3); DbTestUtils.DeleteTest(workLog); Assert.IsNull(gateway.Load <WorkLog>(workLog.Id)); }