public void ShouldReturnCurrentName(
     [Frozen] SearchProvider current,
     Switcher <SearchProvider> switcher,
     IIndexable indexable,
     string expected,
     SwitchingSearchProvider sut)
 {
     current.GetContextIndexName(indexable).Returns(expected);
     sut.GetContextIndexName(indexable).Should().Be(expected);
 }
Пример #2
0
 public void ShouldReturnCurrentNameByIIndexableAndIPipeline(
     [Frozen] SearchProvider current,
     IIndexable indexable,
     BaseCorePipelineManager pipeline,
     string expected,
     SwitchingSearchProvider sut)
 {
     using (new Switcher <SearchProvider>(current))
     {
         current.GetContextIndexName(indexable, pipeline).Returns(expected);
         sut.GetContextIndexName(indexable, pipeline).Should().Be(expected);
     }
 }
 public void ShouldReturnNullByIIndexableAndIPipelineIfCurrentProviderIsNull(SwitchingSearchProvider sut)
 {
     sut.GetContextIndexName(null, null).Should().BeNull();
 }
 public void ShouldReturnNullIfCurrentProviderIsNull(SwitchingSearchProvider sut)
 {
     sut.GetContextIndexName(null).Should().BeNull();
 }