Ejemplo n.º 1
0
        public void Create()
        {
            var item = new OrderByItem("field1", SortOrder.Ascending);
            Assert.AreEqual("field1", item.GetSql());
            Assert.AreEqual("field1", item.ToString());

            item.Order = SortOrder.Descending;
            Assert.AreEqual("field1 desc",item.ToString());

            Assert.IsFalse(item.IsEmpty);
        }
Ejemplo n.º 2
0
 public void Reverse()
 {
     var item = new OrderByItem("field1", SortOrder.Ascending);
     item.Reverse();
     Assert.AreEqual("field1 desc", item.ToString());
     Assert.AreEqual(SortOrder.Descending, item.Order);
 }