コード例 #1
0
ファイル: FilesHistoryTest.cs プロジェクト: zoroz/Terminals
        public void HistoryDateTimeIsInUtcTest()
        {
            InjectionDateTime.SetTestDateTime();
            IConnectionHistory history      = RecordHistoryItemToFilePersistence();
            DateTime           recordedDate = GetRecordedDate(history);

            Assert.AreEqual(recordedDate, Moment.Now, "Correct date wasn't delivered to the history file");
        }
コード例 #2
0
ファイル: FilesHistoryTest.cs プロジェクト: zoroz/Terminals
        public void ClearHistoryTest()
        {
            this.Persistence.ConnectionHistory.HistoryClear += new Action(PrimaryHistory_HistoryClear);
            InjectionDateTime.SetTestDateTime();
            IConnectionHistory history = RecordHistoryItemToFilePersistence();

            history.Clear();
            int historyItems = history.GetDateItems(HistoryIntervals.TODAY).Count;

            Assert.AreEqual(0, historyItems, "File history wasnt clear properly");
            Assert.AreEqual(1, historyClearReported, "History clear wasnt reported properly");
        }