Example #1
0
        public void InvalidTimeValue()
        {
            TimeValue invalid = TimeValue.Invalid;

            Assert.IsFalse(invalid.IsValid);
            Assert.AreEqual(Double.NaN, invalid.Value);
            Assert.AreEqual(-1L, invalid.Time);
        }
Example #2
0
        public void DefaultConstructor()
        {
            TimeValue tv = new TimeValue();

            Assert.IsTrue(tv.IsValid);
            Assert.AreEqual(0.0, tv.Value);
            Assert.AreEqual(0L, tv.Time);
        }
Example #3
0
        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);
        }
Example #4
0
        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);
        }