Exemple #1
0
        public void TestField_ToString()
        {
            //---------------Set up test pack-------------------
            string             name = "TestProp";
            OrderCriteriaField orderCriteriaField = new OrderCriteriaField(name, SortDirection.Descending);
            //---------------Execute Test ----------------------
            string fieldAsString = orderCriteriaField.ToString();

            //---------------Test Result -----------------------
            Assert.AreEqual(name + " DESC", fieldAsString);
            //---------------Tear Down -------------------------
        }
Exemple #2
0
        public void TestField_ToStringSource()
        {
            //---------------Set up test pack-------------------
            string             name = "TestProp";
            OrderCriteriaField orderCriteriaField = new OrderCriteriaField(name, SortDirection.Descending);
            string             source             = Guid.NewGuid().ToString("N");

            orderCriteriaField.Source = new Source(source);
            //---------------Execute Test ----------------------
            string fieldAsString = orderCriteriaField.ToString();

            //---------------Test Result -----------------------
            Assert.AreEqual(string.Format("{0}.{1} DESC", source, name), fieldAsString);
            //---------------Tear Down -------------------------
        }
 public void TestField_ToStringSource()
 {
     //---------------Set up test pack-------------------
     string name = "TestProp";
     OrderCriteriaField orderCriteriaField = new OrderCriteriaField(name, SortDirection.Descending);
     string source = Guid.NewGuid().ToString("N");
     orderCriteriaField.Source = new Source(source);
     //---------------Execute Test ----------------------
     string fieldAsString = orderCriteriaField.ToString();
     //---------------Test Result -----------------------
     Assert.AreEqual(string.Format("{0}.{1} DESC", source, name), fieldAsString);
     //---------------Tear Down -------------------------
 }
 public void TestField_ToString()
 {
     //---------------Set up test pack-------------------
     string name = "TestProp";
     OrderCriteriaField orderCriteriaField = new OrderCriteriaField(name, SortDirection.Descending);
     //---------------Execute Test ----------------------
     string fieldAsString = orderCriteriaField.ToString();
     //---------------Test Result -----------------------
     Assert.AreEqual(name + " DESC", fieldAsString);
     //---------------Tear Down -------------------------
 }