public void CanAddHeaders() { var headers = new HttpHeadersAbstraction(); headers.Add("Test", "Value"); Assert.IsTrue(headers.Contains("Test")); Assert.AreEqual("Value", headers["Test"].First()); }
public void CanClearHeaders() { var headers = new HttpHeadersAbstraction(); headers.Add("Test", "Value"); Assert.IsTrue(headers.Contains("Test")); headers.Clear(); Assert.AreEqual(0, headers.Count()); }
public void CanGetValuesHeaders() { var headers = new HttpHeadersAbstraction(); var values = new List <string>() { "value1", "value2" }; headers.Add("Test", values); Assert.IsTrue(headers.Contains("Test")); Assert.AreEqual(values, headers.GetValues("Test")); }
public void CanAddRangeHeaders() { var headers = new HttpHeadersAbstraction(); var rspMsg = new HttpResponseMessage(); rspMsg.Headers.Add("Test", "Value"); headers.AddRange(rspMsg.Headers); Assert.IsTrue(headers.Contains("Test")); Assert.AreEqual("Value", headers["Test"].First()); }