public void Setup() { urlMapping = new UrlMapping(); browser = new Browser(with => { with.Modules(typeof(AddModule), typeof(RedirectModule)); with.Dependencies(urlMapping); }); }
public void Id_is_returned_if_it_is_not_mapped_to_url() { var sut = new UrlMapping(); var url = sut.Url_for_id("unknown"); Assert.That(url, Is.EqualTo("unknown")); }
public void Id_is_mapped_back_to_url() { var sut = new UrlMapping(); var id = sut.Id_for_Url("a"); var url = sut.Url_for_id(id); Assert.That(url, Is.EqualTo("a")); }
public void Url_for_Url_returns_an_id() { var sut = new UrlMapping(); var id = sut.Id_for_Url("a"); Assert.That(id.Length, Is.EqualTo(6)); }