Exemplo n.º 1
0
        public void WhereCondition_AB()
        {
            WhereCondition wc = new WhereCondition()
            {
                Left  = "A",
                Right = "B"
            };
            string correctValue = "[A] = 'B'";
            string testValue    = wc.Build();

            MyAssert.Equals(correctValue, testValue);
        }
Exemplo n.º 2
0
        public void WhereGroup_2OR()
        {
            WhereGroup wg = new WhereGroup(true)
            {
                new WhereCondition("A", "B"),
                new WhereCondition("C", "D"),
            };

            string correctValue = "([A] = 'B' OR [C] = 'D')";
            string testValue    = wg.Build();

            MyAssert.Equals(correctValue, testValue);
        }
Exemplo n.º 3
0
        public void WhereCondition_AisnotNULL()
        {
            WhereCondition wc = new WhereCondition()
            {
                Left     = "A",
                Operator = "IS NOT",
                Right    = "NULL"
            };
            string correctValue = "[A] IS NOT NULL";
            string testValue    = wc.Build();

            MyAssert.Equals(correctValue, testValue);
        }
Exemplo n.º 4
0
 public void CheckFormatting_0()
 {
     MyAssert.Equals("00:00:00", Timer.FormatTime(0));
 }
Exemplo n.º 5
0
 public void CheckFormatting_86400()
 {
     MyAssert.Equals("24:00:00", Timer.FormatTime(86400));
 }
Exemplo n.º 6
0
 public void CheckFormatting_3600()
 {
     MyAssert.Equals("01:00:00", Timer.FormatTime(3600));
 }
Exemplo n.º 7
0
 public void CheckFormatting_100()
 {
     MyAssert.Equals("00:01:40", Timer.FormatTime(100));
 }