示例#1
0
        public void SearchQueryFact004()
        {
            // Arrange
            var solrOptions       = new SolrExpressOptions();
            var solrConnection    = new FakeSolrConnection <TechProductDocument>();
            var expressionBuilder = new ExpressionBuilder <TechProductDocument>(solrOptions, solrConnection);

            expressionBuilder.LoadDocument();
            var searchQuery = new SearchQuery <TechProductDocument>(expressionBuilder);

            // Act
            var result = searchQuery.AddValue(10.12345).Execute();

            // Assert
            Assert.Equal("10.12345", result);
        }
示例#2
0
        public void SearchQueryFact006()
        {
            // Arrange
            var solrOptions       = new SolrExpressOptions();
            var solrConnection    = new FakeSolrConnection <TechProductDocument>();
            var expressionBuilder = new ExpressionBuilder <TechProductDocument>(solrOptions, solrConnection);

            expressionBuilder.LoadDocument();
            var searchQuery = new SearchQuery <TechProductDocument>(expressionBuilder);

            // Act
            var result = searchQuery.AddValue(new DateTime(1984, 09, 05, 10, 20, 30)).Execute();

            // Assert
            Assert.Equal("1984-09-05T10:20:30Z", result);
        }