示例#1
0
		public void Setup() {
			urlMapping = new UrlMapping();
			browser = new Browser(with => {
				with.Modules(typeof(AddModule), typeof(RedirectModule));
				with.Dependencies(urlMapping);
			});
		}
示例#2
0
		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"));
		}
示例#3
0
		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"));
		}
示例#4
0
		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));
		}