Exemplo n.º 1
0
        public void double_stop_no_exception()
        {
            // Arrange

            // Act
            var taskInfo = new TaskInfo();
            taskInfo.Start();
            taskInfo.Stop();
            taskInfo.Stop();

            // Assert
            // If we got here w/o an exception, we passed
        }
Exemplo n.º 2
0
        public void double_stop_extends_duration()
        {
            // Arrange

            // Act
            var taskInfo = new TaskInfo();
            taskInfo.Start();
            Thread.Sleep(31);
            taskInfo.Stop();
            Thread.Sleep(31);
            taskInfo.Stop();

            // Assert
            Assert.LessOrEqual(.060, taskInfo.Duration);
        }
Exemplo n.º 3
0
        public void start_stop_check_time_success()
        {
            // Arrange

            // Act
            var taskInfo = new TaskInfo();
            taskInfo.Start();
            Thread.Sleep(31);
            taskInfo.Stop();

            // Assert
            Assert.LessOrEqual(.030, taskInfo.Duration);
        }