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); }
public void Reverse() { var item = new OrderByItem("field1", SortOrder.Ascending); item.Reverse(); Assert.AreEqual("field1 desc", item.ToString()); Assert.AreEqual(SortOrder.Descending, item.Order); }