Example #1
0
        public void BuildClauseWhenOrderByIsNotDefined()
        {
            var data   = new Dictionary <string, string>();
            var result = OrderByClause.Build(new ODataOptions <Model>(data));

            result.Should().BeEmpty();
        }
Example #2
0
        public void BuildingClauseWhenOrderByIsDefined()
        {
            var data = new Dictionary <string, string> {
                ["$orderby"] = "Id, Name desc",
                ["$skip"]    = "20"
            };

            var result = OrderByClause.Build(new ODataOptions <Model>(data));

            result.Should().Be("ORDER BY [Id], [Name] DESC");
        }