Commits

Fabio Maulo committed 6fb07a5

Passing test with variable and match-all in Host

Comments (0)

Files changed (1)

HunabKu.MvcAbsoluteRouterTests/ParsedRoutePatternTests/MatchTests/VariablesInDomainTests.cs

 			var actual = parsed.Match(url, null);
 			actual["domain"].Should().Be("acme.com");
 		}
+
+		[Test]
+		public void WhenDomainHasMatchAllThenReturnVariablesValues()
+		{
+			var parsed = ParsedRoutePattern.Parse("http://{topLevelDomain}.{*domain}");
+			var url = "http://ar.acme.com/pizza".AsUri();
+			var actual = parsed.Match(url, null);
+			actual["topLevelDomain"].Should().Be("ar");
+			actual["domain"].Should().Be("acme.com");
+		}
 	}
 }