public void UnshimedCurrentUtcTimeReturnsExpectedTime() { var wrapper = new TimeWrapper(); var now = wrapper.CurrentUtcTime; Assert.IsTrue(now - DateTime.UtcNow < new TimeSpan(0, 0, 2)); }
private void addCar(CarInfo car) { string carName = car.name; if (!timers.ContainsKey(carName)) { GameObject row = Instantiate(lapTimeRowPrefab); row.transform.SetParent(lapTimeList.transform, false); timers[carName] = new TimeWrapper(row, car); } }
public void ShimedCurrentUtcTimeReturnsExpectedTime() { var wrapper = new TimeWrapper(); var expected = new DateTime(2032, 1, 1); using (ShimsContext.Create()) { System.Fakes.ShimDateTime.UtcNowGet = () => expected; var now = wrapper.CurrentUtcTime; Assert.AreEqual(expected, now); } }
public static void Save(IValueSink sink, TimeWrapper value) { Value<Time>.Save(sink, value.Item); }
private int compareTimes(TimeWrapper t1, TimeWrapper t2) { return(t1.Standing - t2.Standing); }
public static void Save(IValueSink sink, TimeWrapper value) { Value <Time> .Save(sink, value.Item); }