public static BuildNegotiate ( IConnection connection, string connectionData ) : string | ||
connection | IConnection | |
connectionData | string | |
Résultat | string |
public void BuildNegotiateAppendsNoCacheToUrl(string connectionData, string expected) { Assert.True( Regex.Match(UrlBuilder.BuildNegotiate(CreateConnection(), connectionData), "^http://fakeurl/negotiate\\?clientProtocol=1.42" + expected + "&connectionToken=My%20Conn%20Token&noCache=[a-zA-Z0-9-]{36}$") .Success); }
public void BuildNegotiateReturnsValidUrlWithConnectionData(string connectionData, string expected) { Assert.Equal( "http://fakeurl/negotiate?clientProtocol=1.42" + expected + "&connectionToken=My%20Conn%20Token", UrlBuilder.BuildNegotiate(CreateConnection(), connectionData)); }
public void BuildNegotiateReturnsValidUrlWithCustomQueryString(string qs, string expected) { Assert.Equal("http://fakeurl/negotiate?clientProtocol=1.42&connectionToken=My%20Conn%20Token" + expected, UrlBuilder.BuildNegotiate(CreateConnection(qs), null)); }
public void BuildNegotiateChecksInputParameters() { Assert.Equal("connection", Assert.Throws <ArgumentNullException>( () => UrlBuilder.BuildNegotiate(null, string.Empty)).ParamName); }