コード例 #1
0
        public void DeleteLog_Test()
        {
            // ARANGE
            TourEntry testTourEntry = new TourEntry(1, "testName", "testDescription", 1234);
            LogEntry  testLogEntry  = new LogEntry(1, testTourEntry, new DateTime(), "testReport", 123, new TimeSpan(), 123);

            mockLogEntryDAO.Setup(mock => mock.DeleteLog(testLogEntry)).Verifiable();
            ITourPlannerAppFactory tourPlannerAppFactoryImp = TourPlannerAppFactory.GetInstance(mockLogEntryDAO.Object);

            // ACT
            tourPlannerAppFactoryImp.DeleteLog(testLogEntry);

            // ASSERT
            mockLogEntryDAO.Verify(mock => mock.DeleteLog(testLogEntry), Times.Once());
        }
コード例 #2
0
 private void DeleteLog(object commandParameter)
 {
     tourPlannerAppFactory.DeleteLog(CurrentLog);
     FillLogs();
 }