public void TestCompoundFragmentExpansionAssociativeMapVariable()
{
string template = "{#keys*}";
UriTemplate uriTemplate = new UriTemplate(template);
Uri uri = uriTemplate.BindByName(variables);
string[] allowed =
{
"#comma=,,dot=.,semi=;",
"#comma=,,semi=;,dot=.",
"#dot=.,comma=,,semi=;",
"#dot=.,semi=;,comma=,",
"#semi=;,comma=,,dot=.",
"#semi=;,dot=.,comma=,"
};
CollectionAssert.Contains(allowed, uri.ToString());
UriTemplateMatch match = uriTemplate.Match(uri, new[] { "list" }, new[] { "keys" });
Assert.IsNotNull(match);
CollectionAssert.AreEqual((ICollection)variables["keys"], (ICollection)match.Bindings["keys"].Value);
match = uriTemplate.Match(uri, requiredVariables, new[] { "list" }, new[] { "keys" });
Assert.IsNotNull(match);
CollectionAssert.AreEqual((ICollection)variables["keys"], (ICollection)match.Bindings["keys"].Value);
}