public void IsValidRenderer() { var renderer = RendererFactory.DefaultRenderer(PolicyFactory.DefaultSelectionPolicy()); var childLinks = renderer.FindChildLinks(new UrlQueueItem { Url = "https://www.monzo.com" }); Assert.NotNull(childLinks); }
public void SelectionPolicy() { var shouldBeTrue = PolicyFactory.DefaultSelectionPolicy().CanIGoThere(new UrlItem { Url = "http://www.google.com" }, "www.google.com/mylink"); var shouldBeFalse = PolicyFactory.DefaultSelectionPolicy().CanIGoThere(new UrlItem { Url = "http://www.google.com" }, "www.facebook.com/mylink"); Assert.True(shouldBeTrue); Assert.False(shouldBeFalse); shouldBeTrue = PolicyFactory.GetSelectionPolicy(true).CanIGoThere(new UrlItem { Url = "http://www.google.com" }, "www.facebook.com/mylink"); Assert.True(shouldBeTrue); }