Exemple #1
0
 public void GetItemUrlCallsCurrentProvider(SwitchingLinkProvider sut, [Substitute] LinkProvider current, Item item, UrlOptions options)
 {
     using (new Switcher <LinkProvider>(current))
     {
         sut.GetItemUrl(item, options).Should().BeSameAs(current.GetItemUrl(item, options));
     }
 }
Exemple #2
0
 public void GetItemUrlOptionsCallsBaseProviderIfCurrentNotSet(SwitchingLinkProvider sut, Item item, UrlOptions options)
 {
     using (new Db())
     {
         sut.GetItemUrl(item, options).Should().NotBeNull();
     }
 }
Exemple #3
0
 public void GetItemUrlWithItemUrlBuilderOptionsCallsBaseProviderIfCurrentNotSet(
     SwitchingLinkProvider sut,
     Item item,
     ItemUrlBuilderOptions options)
 {
     using (new Db())
     {
         sut.Initialize("name", new NameValueCollection());
         sut.GetItemUrl(item, options).Should().NotBeNull();
     }
 }