예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void resetShouldResetToCurrentTime()
        public virtual void resetShouldResetToCurrentTime()
        {
            long     duration = TWO_DAYS;
            DateTime target   = new DateTime((DateTime.Now).Ticks + duration);

            ClockUtil.offset(duration);

            assertThat(ClockUtil.now()).isCloseTo(target, ONE_SECOND);

            ClockUtil.reset();

            assertThat(ClockUtil.now()).isCloseTo(DateTime.Now, ONE_SECOND);
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @AfterClass public static void resetClock()
        public static void resetClock()
        {
            ClockUtil.reset();
        }
예제 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setUp() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        public virtual void setUp()
        {
            ClockUtil.reset();
        }