public void LocalParameter002() { // Arrange var container = new List <string>(); var parameter = new LocalParameter <TestDocument>(); parameter.Name = "myLocalParameter"; parameter.Value = "some value"; // Act parameter.Execute(); parameter.AddResultInContainer(container); // Assert Assert.Single(container); Assert.Equal("myLocalParameter=some value", container[0]); }
public void LocalParameter001() { // Arrange var container = new List <string>(); var parameter = new LocalParameter <TestDocument>(); var solrOptions = new SolrExpressOptions(); var solrConnection = new FakeSolrConnection <TestDocument>(); var expressionBuilder = new ExpressionBuilder <TestDocument>(solrOptions, solrConnection); expressionBuilder.LoadDocument(); var searchQuery = new SearchQuery <TestDocument>(expressionBuilder); parameter.Name = "myLocalParameter"; parameter.Query = searchQuery.Field(q => q.Id).EqualsTo("ITEM01"); // Act parameter.Execute(); parameter.AddResultInContainer(container); // Assert Assert.Single(container); Assert.Equal("myLocalParameter=id:\"ITEM01\"", container[0]); }