Searched refs:ToTimeSpan (Results 1 – 2 of 2) sorted by relevance
41 public void ToTimeSpan() in ToTimeSpan() method in Google.Protobuf.WellKnownTypes.DurationTest43 Assert.AreEqual(TimeSpan.FromSeconds(1), new Duration { Seconds = 1 }.ToTimeSpan()); in ToTimeSpan()44 Assert.AreEqual(TimeSpan.FromSeconds(-1), new Duration { Seconds = -1 }.ToTimeSpan()); in ToTimeSpan()45 … Assert.AreEqual(TimeSpan.FromMilliseconds(1), new Duration { Nanos = 1000000 }.ToTimeSpan()); in ToTimeSpan()46 … Assert.AreEqual(TimeSpan.FromMilliseconds(-1), new Duration { Nanos = -1000000 }.ToTimeSpan()); in ToTimeSpan()47 Assert.AreEqual(TimeSpan.FromTicks(1), new Duration { Nanos = 100 }.ToTimeSpan()); in ToTimeSpan()48 Assert.AreEqual(TimeSpan.FromTicks(-1), new Duration { Nanos = -100 }.ToTimeSpan()); in ToTimeSpan()51 Assert.AreEqual(TimeSpan.FromTicks(2), new Duration { Nanos = 250 }.ToTimeSpan()); in ToTimeSpan()52 Assert.AreEqual(TimeSpan.FromTicks(-2), new Duration { Nanos = -250 }.ToTimeSpan()); in ToTimeSpan()109 Assert.Throws<InvalidOperationException>(() => duration.ToTimeSpan()); in ToTimeSpan_Invalid()[all …]
85 public TimeSpan ToTimeSpan() in ToTimeSpan() method in Google.Protobuf.WellKnownTypes.Duration