ToString() public method

public ToString ( ) : string
return string
Beispiel #1
0
        public void CookieHeaderValue_Clone()
        {
            // Arrange
            NameValueCollection nvc = new NameValueCollection();

            nvc.Add("name", "value");
            CookieHeaderValue expectedValue = new CookieHeaderValue("cookie", nvc);

            expectedValue.Domain   = "domain";
            expectedValue.Expires  = DateTimeOffset.Now;
            expectedValue.MaxAge   = TimeSpan.FromDays(10);
            expectedValue.Path     = "path";
            expectedValue.HttpOnly = true;
            expectedValue.Secure   = true;

            // Act
            CookieHeaderValue actualValue = expectedValue.Clone() as CookieHeaderValue;

            // Assert
            Assert.Equal(expectedValue.ToString(), actualValue.ToString());
        }
        public void CookieHeaderValue_Clone()
        {
            // Arrange
            NameValueCollection nvc = new NameValueCollection();
            nvc.Add("name", "value");
            CookieHeaderValue expectedValue = new CookieHeaderValue("cookie", nvc);
            expectedValue.Domain = "domain";
            expectedValue.Expires = DateTimeOffset.Now;
            expectedValue.MaxAge = TimeSpan.FromDays(10);
            expectedValue.Path = "path";
            expectedValue.HttpOnly = true;
            expectedValue.Secure = true;

            // Act
            CookieHeaderValue actualValue = expectedValue.Clone() as CookieHeaderValue;

            // Assert
            Assert.Equal(expectedValue.ToString(), actualValue.ToString());
        }
 public void CookieHeaderValue_ToString(CookieHeaderValue input, string expectedValue)
 {
     Assert.Equal(expectedValue, input.ToString());
 }
Beispiel #4
0
 public void CookieHeaderValue_ToString(CookieHeaderValue input, string expectedValue)
 {
     Assert.Equal(expectedValue, input.ToString());
 }