Ejemplo n.º 1
0
        public void ToTimeSpan_Invalid(long seconds, int nanoseconds)
        {
            var duration = new Duration {
                Seconds = seconds, Nanos = nanoseconds
            };

            Assert.Throws <InvalidOperationException>(() => duration.ToTimeSpan());
        }
Ejemplo n.º 2
0
        public void ToTimeSpan_Valid(long seconds, int nanoseconds)
        {
            // Only testing that these values don't throw, unlike their similar tests in ToTimeSpan_Invalid
            var duration = new Duration {
                Seconds = seconds, Nanos = nanoseconds
            };

            duration.ToTimeSpan();
        }