public void ContainsHeaderWithoutKeyShouldThrowException() { HttpHeader httpHeader = new HttpHeader("name", "pesho"); HttpHeaderCollection headerCollection = new HttpHeaderCollection(); headerCollection.Add(httpHeader); Assert.Throws <BadRequestException>(() => headerCollection.ContainsHeader(string.Empty)); }
public void GetContainedHeaderShouldReturnTrue() { HttpHeader httpHeader = new HttpHeader("name", "pesho"); HttpHeaderCollection headerCollection = new HttpHeaderCollection(); headerCollection.Add(httpHeader); Assert.True(headerCollection.ContainsHeader(httpHeader.Key)); }
public void GetNotContainedHeaderShouldReturnFalse() { HttpHeaderCollection headerCollection = new HttpHeaderCollection(); Assert.False(headerCollection.ContainsHeader("name")); }