public void Should_parse_authority_correctly_when_uri_has_path() { UriInfo uriInfo = default; var(success, _) = _parser.TryParseAuthority("http://*****:*****@foobar.com:321/path/foo/bar?x=z", out _, ref uriInfo); Assert.True(success); //sanity check Assert.Equal("john", uriInfo.Username.ToString()); Assert.Equal("1234", uriInfo.Password.ToString()); Assert.Equal("foobar.com", uriInfo.Host.ToString()); Assert.Equal("321", uriInfo.Port.ToString()); }