Пример #1
0
        public void BuildingClauseWhenTopIsNotDefined()
        {
            var data = new Dictionary<string, string>();
            var result = TopClause.Build(new ODataOptions<Model>(data));

            result.Should().BeEmpty();
        }
Пример #2
0
        public void BuildClauseWhenOnlyTopIsDefined()
        {
            var data = new Dictionary<string, string> {
                ["$top"] = "20"
            };

            var result = TopClause.Build(new ODataOptions<Model>(data));
            result.Should().Be("TOP(20)");
        }
Пример #3
0
        public void BuildingClauseWhenTopAndSkipAreDefined()
        {
            var data = new Dictionary<string, string> {
                ["$top"] = "20",
                ["$skip"] = "5"
            };

            var result = TopClause.Build(new ODataOptions<Model>(data));
            result.Should().BeEmpty();
        }