Exemplo n.º 1
0
        public void FT_AsOf_3()
        {
            Tbool t   = new Tbool(true);
            Tbool res = t.AsOf(Time.DawnOf.AddYears(12));

            Assert.AreEqual(true, res.Out);
        }
Exemplo n.º 2
0
        public void FT_AsOf_11()
        {
            Tbool t    = new Tbool(Hstate.Stub);
            Tdate time = new Tdate(Hstate.Unstated);

            Assert.AreEqual("Stub", t.AsOf(time).Out);
        }
Exemplo n.º 3
0
        public void FT_AsOf_13()
        {
            // Tdate unknown, but base Tvar is eternal, so .AsOf should return that eternal value
            Tbool t    = new Tbool(true);
            Tdate time = new Tdate(Hstate.Stub);

            Assert.AreEqual(true, t.AsOf(time).Out);
        }
Exemplo n.º 4
0
        public void FT_AsOf_2()
        {
            Tbool t = new Tbool(true);

            t.AddState(Time.DawnOf.AddYears(5), false);
            Tbool res = t.AsOf(Time.DawnOf.AddYears(12));

            Assert.AreEqual(false, res.Out);
        }
Exemplo n.º 5
0
        public void FT_AsOf_12()
        {
            // Tdate varies, but base Tvar is eternal, so .AsOf should return that eternal value
            Tbool t    = new Tbool(true);
            Tdate time = new Tdate(Date(2000, 1, 1));

            time.AddState(Date(2010, 1, 1), Date(2010, 1, 1));
            Assert.AreEqual(true, t.AsOf(time).Out);
        }
Exemplo n.º 6
0
        public void FT_AsOf_10()
        {
            Tbool t = new Tbool(true);

            t.AddState(Time.DawnOf.AddYears(5), false);

            Tdate time = new Tdate(Hstate.Stub);

            Assert.AreEqual("Stub", t.AsOf(time).Out);
        }
Exemplo n.º 7
0
        public void FT_AsOf_9()
        {
            Tbool t = new Tbool(true);

            t.AddState(new DateTime(2000, 1, 1), false);

            Tdate time = new Tdate(1999, 1, 1);

            Assert.AreEqual(true, t.AsOf(time).Out);
        }
Exemplo n.º 8
0
        public void FT_AsOf_14()
        {
            // Both Tdate and Tvar vary
            Tbool t = new Tbool(true);

            t.AddState(Date(2000, 1, 1), false);

            // When Tdate varies, the FirstValue is used...
            Tdate time = new Tdate(Date(1999, 1, 1));

            time.AddState(Date(2010, 1, 1), Date(2010, 1, 1));

            Assert.AreEqual(true, t.AsOf(time).Out);
        }
Exemplo n.º 9
0
        public void TheQuarter1()
        {
            Tbool is4thQtr = TheQuarter == 4;

            Assert.AreEqual(true, is4thQtr.AsOf(Date(2015, 11, 15)).Out);
        }
 public void FT_AsOf_3()
 {
     Tbool t = new Tbool(true);
     Tbool res = t.AsOf(Time.DawnOf.AddYears(12));
     Assert.AreEqual(true, res.Out);
 }
        public void FT_AsOf_9()
        {
            Tbool t = new Tbool(true);
            t.AddState(new DateTime(2000,1,1), false);

            Tdate time = new Tdate(1999,1,1);

            Assert.AreEqual(true, t.AsOf(time).Out);
        }
        public void FT_AsOf_14()
        {
            // Both Tdate and Tvar vary
            Tbool t = new Tbool(true);
            t.AddState(Date(2000,1,1),false);

            // When Tdate varies, the FirstValue is used...
            Tdate time = new Tdate(Date(1999,1,1));
            time.AddState(Date(2010,1,1),Date(2010,1,1));

            Assert.AreEqual(true, t.AsOf(time).Out);
        }
 public void FT_AsOf_2()
 {
     Tbool t = new Tbool(true);
     t.AddState(Time.DawnOf.AddYears(5), false);
     Tbool res = t.AsOf(Time.DawnOf.AddYears(12));
     Assert.AreEqual(false, res.Out);
 }
Exemplo n.º 14
0
        public void TheMonth1()
        {
            Tbool isApril = TheMonth == 4;

            Assert.AreEqual(false, isApril.AsOf(Date(2015, 3, 15)).Out);
        }
 public void FT_AsOf_13()
 {
     // Tdate unknown, but base Tvar is eternal, so .AsOf should return that eternal value
     Tbool t = new Tbool(true);
     Tdate time = new Tdate(Hstate.Stub);
     Assert.AreEqual(true, t.AsOf(time).Out);
 }
Exemplo n.º 16
0
        public void TheMonth3()
        {
            Tbool isAfterJuly = TheMonth > 7;

            Assert.AreEqual(false, isAfterJuly.AsOf(Date(2015, 4, 15)).Out);
        }
Exemplo n.º 17
0
        public void TheMonth2()
        {
            Tbool isApril = TheMonth == 4;

            Assert.AreEqual(true, isApril.AsOf(Date(2015, 4, 15)).Out);
        }
Exemplo n.º 18
0
        public void IsBefore3()
        {
            Tbool beforeY2K = Time.IsBefore(Date(2000, 1, 1));

            Assert.AreEqual(false, beforeY2K.AsOf(Date(2000, 1, 1)).Out);
        }
Exemplo n.º 19
0
        public void IsBefore2()
        {
            Tbool beforeY2K = Time.IsBefore(Date(2000, 1, 1));

            Assert.AreEqual(true, beforeY2K.AsOf(Date(1999, 1, 1)).Out);
        }
Exemplo n.º 20
0
        public void IsAtOrAfter3()
        {
            Tbool afterY2K = Time.IsAtOrAfter(Date(2000, 1, 1));

            Assert.AreEqual(true, afterY2K.AsOf(Date(2000, 1, 1)).Out);
        }
Exemplo n.º 21
0
        public void IsAtOrAfter2()
        {
            Tbool afterY2K = Time.IsAtOrAfter(Date(2000, 1, 1));

            Assert.AreEqual(false, afterY2K.AsOf(Date(1999, 1, 1)).Out);
        }
Exemplo n.º 22
0
        public void TheMonth4()
        {
            Tbool isAfterJuly = TheMonth > 7;

            Assert.AreEqual(true, isAfterJuly.AsOf(Date(2015, 8, 15)).Out);
        }
Exemplo n.º 23
0
        public void TheYear3()
        {
            Tbool isAfterY2K = TheYear > 2000;

            Assert.AreEqual(true, isAfterY2K.AsOf(Date(1999, 12, 31)).Out);
        }
Exemplo n.º 24
0
        public void TheYear2()
        {
            Tbool isAfterY2K = TheYear > 2000;

            Assert.AreEqual(true, isAfterY2K.AsOf(DateTime.Now).Out);
        }
        public void FT_AsOf_10()
        {
            Tbool t = new Tbool(true);
            t.AddState(Time.DawnOf.AddYears(5), false);

            Tdate time = new Tdate(Hstate.Stub);

            Assert.AreEqual("Stub", t.AsOf(time).Out);
        }
Exemplo n.º 26
0
        public void TheQuarter2()
        {
            Tbool is4thQtr = TheQuarter == 4;

            Assert.AreEqual(false, is4thQtr.AsOf(Date(2015, 3, 15)).Out);
        }
 public void FT_AsOf_11()
 {
     Tbool t = new Tbool(Hstate.Stub);
     Tdate time = new Tdate(Hstate.Unstated);
     Assert.AreEqual("Stub", t.AsOf(time).Out);
 }
 public void FT_AsOf_12()
 {
     // Tdate varies, but base Tvar is eternal, so .AsOf should return that eternal value
     Tbool t = new Tbool(true);
     Tdate time = new Tdate(Date(2000,1,1));
     time.AddState(Date(2010,1,1),Date(2010,1,1));
     Assert.AreEqual(true, t.AsOf(time).Out);
 }
Exemplo n.º 29
0
        public void Unknown_AsOf_1()
        {
            Tbool result = tbu.AsOf(DateTime.Now);

            Assert.AreEqual(eternallyUnstated, result.Out);
        }
Exemplo n.º 30
0
        public void IsBetween5()
        {
            Tbool isDuringTheBushYears = Time.IsBetween(Date(2001, 1, 20), Date(2009, 1, 20));

            Assert.AreEqual(false, isDuringTheBushYears.AsOf(Date(2012, 1, 1)).Out);
        }