Ejemplo n.º 1
0
        public void TimeSpanStopwatchTicksRoundTrip()
        {
            Assert.AreEqual(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 1, TimeSpanExtensions.TimeSpanTicksToStopwatchTicks(TimeSpanExtensions.StopwatchTicksToTimeSpanTicks(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 1)));
            Assert.AreEqual(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 100, TimeSpanExtensions.TimeSpanTicksToStopwatchTicks(TimeSpanExtensions.StopwatchTicksToTimeSpanTicks(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 100)));
            Assert.AreEqual(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 100000, TimeSpanExtensions.TimeSpanTicksToStopwatchTicks(TimeSpanExtensions.StopwatchTicksToTimeSpanTicks(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 100000)));
            Assert.AreEqual(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 10000000000, TimeSpanExtensions.TimeSpanTicksToStopwatchTicks(TimeSpanExtensions.StopwatchTicksToTimeSpanTicks(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 10000000000)));

            Assert.AreEqual(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 1, TimeSpanExtensions.StopwatchTicksToTimeSpanTicks(TimeSpanExtensions.TimeSpanTicksToStopwatchTicks(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 1)));
            Assert.AreEqual(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 100, TimeSpanExtensions.StopwatchTicksToTimeSpanTicks(TimeSpanExtensions.TimeSpanTicksToStopwatchTicks(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 100)));
            Assert.AreEqual(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 100000, TimeSpanExtensions.StopwatchTicksToTimeSpanTicks(TimeSpanExtensions.TimeSpanTicksToStopwatchTicks(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 100000)));
            Assert.AreEqual(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 10000000000, TimeSpanExtensions.StopwatchTicksToTimeSpanTicks(TimeSpanExtensions.TimeSpanTicksToStopwatchTicks(TimeSpanExtensions.TimeSpanStopwatchConversionLeastCommonMultiple * 10000000000)));
        }