public void AddParam() { GetRequestBuilder <int, Greeting> b = new GetRequestBuilder <int, Greeting>(baseUrl); b.AddParam("param2", "value2"); Assert.IsFalse(b.HasParam("param1")); Assert.IsTrue(b.HasParam("param2")); List <object> paramList = (List <object>)b.GetParam("param2"); Assert.AreEqual("value2", paramList[0], "value2"); b.AddParam("param2", 123); paramList = (List <object>)b.GetParam("param2"); Assert.IsTrue(paramList.Count == 2); Assert.AreEqual("value2", paramList[0]); Assert.AreEqual(123, paramList[1]); }
private string GetSignature(DateTime utcNow) { GetRequestBuilder builder = new GetRequestBuilder(_builder); builder.AddParam(_tKey, utcNow.ToString("s")); string signature = _signer.Sign(Constants.GET_METHOD, Host, Path, builder.Build()); return(signature); }