public void WhenAddIsUsedAndNameIsTheSameThenCountDoesNotIncrease() { var headers = new HttpConnectHeaders(); headers.Add("name-1", "value-1"); headers.Add("name-1", "value-1"); headers.Add("name-1", "value-1"); headers.Add("name-1", "value-1"); headers.Add("name-1", "value-1"); headers.Should().HaveCount(1); }
public void WhenAddIsUsedThenCountIncreases() { var headers = new HttpConnectHeaders(); headers.Add("name-1", "value-1"); headers.Add("name-2", "value-2"); headers.Add("name-3", "value-3"); headers.Add("name-4", "value-4"); headers.Add("name-5", "value-5"); headers.Should().HaveCount(5); }
public void ReturnsFalseWhenHeaderCannotBeFound() { var headers = new HttpConnectHeaders(); headers.Add("x-header", "value"); headers.TryGetValue("UNKNOWN", out string _).Should().BeFalse(); }
public void ReturnsTrueWhenHeaderCanBeFound() { var headers = new HttpConnectHeaders(); headers.Add("x-header", "value"); headers.TryGetValue("x-header", out string _).Should().BeTrue(); }
public void ReturnsNullInOutParameterWhenHeaderCannotBeFound() { var headers = new HttpConnectHeaders(); headers.Add("x-header", "my-value"); headers.TryGetValue("UNKNOWN", out string value); value.Should().BeNull(); }