コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #9
0
        public void TheQuarter1()
        {
            Tbool is4thQtr = TheQuarter == 4;

            Assert.AreEqual(true, is4thQtr.AsOf(Date(2015, 11, 15)).Out);
        }
コード例 #10
0
 public void FT_AsOf_3()
 {
     Tbool t = new Tbool(true);
     Tbool res = t.AsOf(Time.DawnOf.AddYears(12));
     Assert.AreEqual(true, res.Out);
 }
コード例 #11
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);
        }
コード例 #12
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);
        }
コード例 #13
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);
 }
コード例 #14
0
        public void TheMonth1()
        {
            Tbool isApril = TheMonth == 4;

            Assert.AreEqual(false, isApril.AsOf(Date(2015, 3, 15)).Out);
        }
コード例 #15
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);
 }
コード例 #16
0
        public void TheMonth3()
        {
            Tbool isAfterJuly = TheMonth > 7;

            Assert.AreEqual(false, isAfterJuly.AsOf(Date(2015, 4, 15)).Out);
        }
コード例 #17
0
        public void TheMonth2()
        {
            Tbool isApril = TheMonth == 4;

            Assert.AreEqual(true, isApril.AsOf(Date(2015, 4, 15)).Out);
        }
コード例 #18
0
        public void IsBefore3()
        {
            Tbool beforeY2K = Time.IsBefore(Date(2000, 1, 1));

            Assert.AreEqual(false, beforeY2K.AsOf(Date(2000, 1, 1)).Out);
        }
コード例 #19
0
        public void IsBefore2()
        {
            Tbool beforeY2K = Time.IsBefore(Date(2000, 1, 1));

            Assert.AreEqual(true, beforeY2K.AsOf(Date(1999, 1, 1)).Out);
        }
コード例 #20
0
        public void IsAtOrAfter3()
        {
            Tbool afterY2K = Time.IsAtOrAfter(Date(2000, 1, 1));

            Assert.AreEqual(true, afterY2K.AsOf(Date(2000, 1, 1)).Out);
        }
コード例 #21
0
        public void IsAtOrAfter2()
        {
            Tbool afterY2K = Time.IsAtOrAfter(Date(2000, 1, 1));

            Assert.AreEqual(false, afterY2K.AsOf(Date(1999, 1, 1)).Out);
        }
コード例 #22
0
        public void TheMonth4()
        {
            Tbool isAfterJuly = TheMonth > 7;

            Assert.AreEqual(true, isAfterJuly.AsOf(Date(2015, 8, 15)).Out);
        }
コード例 #23
0
        public void TheYear3()
        {
            Tbool isAfterY2K = TheYear > 2000;

            Assert.AreEqual(true, isAfterY2K.AsOf(Date(1999, 12, 31)).Out);
        }
コード例 #24
0
        public void TheYear2()
        {
            Tbool isAfterY2K = TheYear > 2000;

            Assert.AreEqual(true, isAfterY2K.AsOf(DateTime.Now).Out);
        }
コード例 #25
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);
        }
コード例 #26
0
        public void TheQuarter2()
        {
            Tbool is4thQtr = TheQuarter == 4;

            Assert.AreEqual(false, is4thQtr.AsOf(Date(2015, 3, 15)).Out);
        }
コード例 #27
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);
 }
コード例 #28
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);
 }
コード例 #29
0
        public void Unknown_AsOf_1()
        {
            Tbool result = tbu.AsOf(DateTime.Now);

            Assert.AreEqual(eternallyUnstated, result.Out);
        }
コード例 #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);
        }