public void TrailingSeparator() { var subject = new RequestCookieCollection("name=value;"); subject.Get("name").Value.Should().Be("value"); subject.Count().Should().Be(1); }
public void SingleCookie() { var subject = new RequestCookieCollection("name=value"); subject.Get("name").Value.Should().Be("value"); subject.Count().Should().Be(1); }
public void CommaInValue() { var subject = new RequestCookieCollection("name=value,value2"); subject.Get("name").Value.Should().Be("value"); subject.Get("value2").Value.Should().Be(""); subject.Count().Should().Be(2); }
public void TwoCookies() { var subject = new RequestCookieCollection("name=value;name2=value2"); subject.Get("name").Value.Should().Be("value"); subject.Get("name2").Value.Should().Be("value2"); subject.Count().Should().Be(2); }
public void CommaSeparated() { var subject = new RequestCookieCollection("name=value,name2=value2"); subject.Get("name").Value.ShouldEqual("value"); subject.Get("name2").Value.ShouldEqual("value2"); subject.Count().ShouldEqual(2); }
public void Whitespace() { var subject = new RequestCookieCollection("name=value\n;\tname2=value2 ; name3=value3\n"); subject.Get("name").Value.Should().Be("value"); subject.Get("name2").Value.Should().Be("value2"); subject.Get("name3").Value.Should().Be("value3"); subject.Count().Should().Be(3); }
public void MixedSeparated() { var subject = new RequestCookieCollection("name=value,name2=value2;name3=value3"); subject.Get("name").Value.Should().Be("value"); subject.Get("name2").Value.Should().Be("value2"); subject.Get("name3").Value.Should().Be("value3"); subject.Count().Should().Be(3); }