public void SystemParameter001()
        {
            // Arrange
            var container = new List <string>();
            var parameter = new SystemParameter <TestDocument>();

            parameter.Configure();

            // Act
            parameter.Execute(container);

            // Assert
            Assert.Equal("echoParams=none", container[0]);
            Assert.Equal("wt=json", container[1]);
            Assert.Equal("indent=off", container[2]);
            Assert.Equal("defType=edismax", container[3]);
            Assert.Equal("q.alt=*:*", container[4]);
            Assert.Equal("df=id", container[5]);
            Assert.Equal("fl=*,score", container[6]);
            Assert.Equal("sort=score desc", container[7]);
            Assert.Equal("q=*:*", container[8]);
        }
Beispiel #2
0
        public void SystemParameter001()
        {
            // Arrange
            var container = new JObject();
            var parameter = new SystemParameter <TestDocument>();

            parameter.Configure();

            // Act
            parameter.Execute(container);

            // Assert
            Assert.Equal("none", container["params"]["echoParams"]);
            Assert.Equal("json", container["params"]["wt"]);
            Assert.Equal("off", container["params"]["indent"]);
            Assert.Equal("edismax", container["params"]["defType"]);
            Assert.Equal("*:*", container["params"]["q.alt"]);
            Assert.Equal("id", container["params"]["df"]);
            Assert.Equal("*,score", container["fields"][0]);
            Assert.Equal("score desc", container["sort"]);
            Assert.Equal("*:*", container["query"]);
        }