Exemple #1
0
        public void ReOpenTask_IsFinished_False()
        {
            WorkTask task = new WorkTask("1000", DummyDescription);

            task.CloseTask(string.Empty);
            task.ReOpenTask(string.Empty);
            Assert.False(task.IsFinished);
        }
Exemple #2
0
        public void ReOpeneTask_OpenedTask_NoChange()
        {
            WorkTask task        = new WorkTask("1000", DummyDescription);
            DateTime createdTime = task.TaskStatusHistory.TimeLastOpened;

            task.ReOpenTask(string.Empty);
            Assert.Equal(task.TaskStatusHistory.TimeLastOpened, createdTime);
        }
Exemple #3
0
        public async Task ReOpenTask_TimeLastOpenIsNow()
        {
            WorkTask task = new WorkTask("1000", DummyDescription);

            task.CloseTask(string.Empty);

            await Task.Delay(SleepTimeInMs).ConfigureAwait(false);

            task.ReOpenTask(string.Empty);

            Assert.True(IsTimesAlmostTheSame(task.TaskStatusHistory.TimeLastOpened, DateTime.Now));
        }