public void InvalidTimeValue() { TimeValue invalid = TimeValue.Invalid; Assert.IsFalse(invalid.IsValid); Assert.AreEqual(Double.NaN, invalid.Value); Assert.AreEqual(-1L, invalid.Time); }
public void DefaultConstructor() { TimeValue tv = new TimeValue(); Assert.IsTrue(tv.IsValid); Assert.AreEqual(0.0, tv.Value); Assert.AreEqual(0L, tv.Time); }
public void TestEquals() { TimeValue tv1 = new TimeValue(); TimeValue tv2 = new TimeValue(); Assert.AreEqual(tv1, tv2); tv2 = new TimeValue(1L, 3.0); Assert.AreNotEqual(tv1, tv2); tv1 = new TimeValue(1L, 3.0); Assert.AreEqual(tv1, tv2); }
public void TestOperators() { TimeValue tv1 = new TimeValue(); TimeValue tv2 = new TimeValue(); Assert.IsTrue(tv1 == tv2); Assert.IsFalse(tv1 != tv2); tv2 = new TimeValue(1L, 3.0); Assert.IsFalse(tv1 == tv2); Assert.IsTrue(tv1 != tv2); tv1 = new TimeValue(1L, 3.0); Assert.IsTrue(tv1 == tv2); Assert.IsFalse(tv1 != tv2); }