BuildSend() public static method

public static BuildSend ( IConnection connection, string transport, string connectionData ) : string
connection IConnection
transport string
connectionData string
return string
Beispiel #1
0
 public void BuildSendRetunsValidUrlWithConnectionDataAndCustomQueryString(string qs, string expected)
 {
     Assert.Equal(
         "http://fakeurl/send?clientProtocol=1.42&transport=webPolling&connectionData=CustomConnectionData&connectionToken=My%20Conn%20Token" +
         expected,
         UrlBuilder.BuildSend(CreateConnection(qs), "webPolling", "CustomConnectionData"));
 }
Beispiel #2
0
            public void BuildSendChecksInputParameters()
            {
                Assert.Equal("connection",
                             Assert.Throws <ArgumentNullException>(
                                 () => UrlBuilder.BuildSend(null, "transport", string.Empty)).ParamName);

                Assert.Equal("transport",
                             Assert.Throws <ArgumentNullException>(
                                 () => UrlBuilder.BuildSend(Mock.Of <IConnection>(), null, string.Empty)).ParamName);

                Assert.Equal("transport",
                             Assert.Throws <ArgumentNullException>(
                                 () => UrlBuilder.BuildSend(Mock.Of <IConnection>(), string.Empty, string.Empty)).ParamName);

                Assert.Equal("transport",
                             Assert.Throws <ArgumentNullException>(
                                 () => UrlBuilder.BuildSend(Mock.Of <IConnection>(), " ", string.Empty)).ParamName);
            }
Beispiel #3
0
 public void BuildSendRetunsValidUrlWithConnectionData(string connectionData, string expected)
 {
     Assert.Equal(
         "http://fakeurl/send?clientProtocol=1.42&transport=webPolling" + expected + "&connectionToken=My%20Conn%20Token",
         UrlBuilder.BuildSend(CreateConnection(), "webPolling", connectionData));
 }