Example #1
0
        public void TestCurrentTimeUTC()
        {
            var processor      = new TimeProcessor();
            var preTestTimeUtc = DateTime.UtcNow;

            var result = processor.CurrentTimeUTC();

            var postTestTimeUtc = DateTime.UtcNow;

            Assert.True(result >= preTestTimeUtc);
            Assert.True(result <= postTestTimeUtc);
        }
        public void TestCurrentTimeUTC()
        {
            // Arrange
            var processor      = new TimeProcessor();
            var preTestTimeUtc = DateTime.UtcNow;

            // Act
            var result = processor.CurrentTimeUTC();

            // Assert time moves forwards
            var postTestTimeUtc = DateTime.UtcNow;

            Assert.True(result >= preTestTimeUtc);
            Assert.True(result <= postTestTimeUtc);
        }
Example #3
0
        public void TestCurrentTimeUTC()
        {
            //Given
            var processor = new TimeProcessor();
            var prevTime  = DateTime.UtcNow;

            //When
            var currTime = processor.CurrentTimeUTC();

            //Then
            var nextTime = DateTime.UtcNow;

            Assert.True(currTime >= prevTime);
            Assert.True(currTime <= nextTime);
        }