public void GetQueryPredicate_NewsItemWithWrongContent_ShouldReturnFalse(string fieldName, NewsIndexingProvider provider, IQuery query, string queryText, string contentText) { var item = Substitute.For<SearchResultItem>(); query.QueryText.Returns(queryText); item[fieldName].Returns(contentText); provider.GetQueryPredicate(query).Compile().Invoke(item).Should().BeFalse(); }
public void ContentType_ShouldBeNews(NewsIndexingProvider provider, [Content] Item dictionaryRoot) { Context.Site = new FakeSiteContext(new StringDictionary() { ["dictionaryPath"] = dictionaryRoot.Paths.FullPath, ["database"] = "master" }); provider.ContentType.Should().Be("News"); }
public void GetQueryPredicate_WrongTemplate_ShouldReturnFalse(NewsIndexingProvider provider, IQuery query) { provider.GetQueryPredicate(query).Compile().Invoke(new SearchResultItem()).Should().BeFalse(); }
public void SupportedTemplates_ContainsNewsArticleTemplate(NewsIndexingProvider provider) { provider.SupportedTemplates.Should().Contain(Templates.NewsArticle.ID); }