Exemplo n.º 1
0
        public void NoOrderTest()
        {
            var tested = new OrderClause();

            string expected = "";
            string actual = tested.ToQueryString();

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        public void MultiOrderTest()
        {
            var order = new Mock<OrderByElement>();
            order.Setup (x => x.ToQueryString()).Returns("A ASC");

            var tested = new OrderClause();
            tested.OrderBy.Add (order.Object);
            tested.OrderBy.Add (order.Object);
            tested.OrderBy.Add (order.Object);

            string expected = "ORDER BY A ASC, A ASC, A ASC";
            string actual = tested.ToQueryString();

            Assert.AreEqual(expected, actual);
        }