public void SpellChecking() { var mocks = new MockRepository(); var parser = mocks.DynamicMock <ISolrQueryResultParser <TestDocument> >(); var conn = mocks.DynamicMock <ISolrConnection>(); var queryExecuter = new SolrQueryExecuter <TestDocument>(parser, conn, null, null, null); var p = queryExecuter.GetSpellCheckingParameters(new QueryOptions { SpellCheck = new SpellCheckingParameters { Query = "hell", Build = true, Collate = true, Count = 4, Dictionary = "spanish", OnlyMorePopular = true, Reload = true, }, }).ToList(); Assert.Contains(p, KV.Create("spellcheck", "true")); Assert.Contains(p, KV.Create("spellcheck.q", "hell")); Assert.Contains(p, KV.Create("spellcheck.build", "true")); Assert.Contains(p, KV.Create("spellcheck.collate", "true")); Assert.Contains(p, KV.Create("spellcheck.count", "4")); Assert.Contains(p, KV.Create("spellcheck.dictionary", "spanish")); Assert.Contains(p, KV.Create("spellcheck.onlyMorePopular", "true")); Assert.Contains(p, KV.Create("spellcheck.reload", "true")); }
public void SpellChecking() { var queryExecuter = new SolrQueryExecuter <TestDocument>(null, null, null, null, null); var p = queryExecuter.GetSpellCheckingParameters(new QueryOptions { SpellCheck = new SpellCheckingParameters { Query = "hell", Build = true, Collate = true, Count = 4, Dictionary = "spanish", OnlyMorePopular = true, Reload = true, }, }).ToList(); Assert.Contains(p, KV.Create("spellcheck", "true")); Assert.Contains(p, KV.Create("spellcheck.q", "hell")); Assert.Contains(p, KV.Create("spellcheck.build", "true")); Assert.Contains(p, KV.Create("spellcheck.collate", "true")); Assert.Contains(p, KV.Create("spellcheck.count", "4")); Assert.Contains(p, KV.Create("spellcheck.dictionary", "spanish")); Assert.Contains(p, KV.Create("spellcheck.onlyMorePopular", "true")); Assert.Contains(p, KV.Create("spellcheck.reload", "true")); }
public void SpellChecking() { var queryExecuter = new SolrQueryExecuter<TestDocument>(null, null, null, null, null); var p = queryExecuter.GetSpellCheckingParameters(new QueryOptions { SpellCheck = new SpellCheckingParameters { Query = "hell", Build = true, Collate = true, Count = 4, Dictionary = "spanish", OnlyMorePopular = true, Reload = true, }, }).ToList(); Assert.Contains(p, KV.Create("spellcheck", "true")); Assert.Contains(p, KV.Create("spellcheck.q", "hell")); Assert.Contains(p, KV.Create("spellcheck.build", "true")); Assert.Contains(p, KV.Create("spellcheck.collate", "true")); Assert.Contains(p, KV.Create("spellcheck.count", "4")); Assert.Contains(p, KV.Create("spellcheck.dictionary", "spanish")); Assert.Contains(p, KV.Create("spellcheck.onlyMorePopular", "true")); Assert.Contains(p, KV.Create("spellcheck.reload", "true")); }
public void SpellChecking() { var mocks = new MockRepository(); var parser = mocks.DynamicMock<ISolrQueryResultParser<TestDocument>>(); var conn = mocks.DynamicMock<ISolrConnection>(); var queryExecuter = new SolrQueryExecuter<TestDocument>(parser, conn, null, null, null); var p = queryExecuter.GetSpellCheckingParameters(new QueryOptions { SpellCheck = new SpellCheckingParameters { Query = "hell", Build = true, Collate = true, Count = 4, Dictionary = "spanish", OnlyMorePopular = true, Reload = true, }, }).ToList(); Assert.Contains(p, KV.Create("spellcheck", "true")); Assert.Contains(p, KV.Create("spellcheck.q", "hell")); Assert.Contains(p, KV.Create("spellcheck.build", "true")); Assert.Contains(p, KV.Create("spellcheck.collate", "true")); Assert.Contains(p, KV.Create("spellcheck.count", "4")); Assert.Contains(p, KV.Create("spellcheck.dictionary", "spanish")); Assert.Contains(p, KV.Create("spellcheck.onlyMorePopular", "true")); Assert.Contains(p, KV.Create("spellcheck.reload", "true")); }