public void CookiesShouldAllowSecureToBeSet() { Cookie cookie = new ReturnedCookie("name", "value", "", "/", DateTime.Now, true, false); Assert.IsTrue(cookie.Secure); }
public void ShouldAllowExpiryToBeNull() { Cookie cookie = new ReturnedCookie("name", "value", "", "/", null, false, false); }
public void CookiesShouldAllowHttpOnlyToBeSet() { Cookie cookie = new ReturnedCookie("name", "value", "", "/", DateTime.Now, false, true); Assert.IsTrue(cookie.IsHttpOnly); }
public void ShouldRetainCookieSecure() { driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIsSecure("animals"); ReturnedCookie addedCookie = new ReturnedCookie("fish", "cod", string.Empty, "/common/animals", null, true, false); driver.Manage().Cookies.AddCookie(addedCookie); driver.Navigate().Refresh(); Cookie retrieved = driver.Manage().Cookies.GetCookieNamed("fish"); Assert.IsNotNull(retrieved); Assert.IsTrue(retrieved.Secure); }
public void ShouldThrowAnExceptionWhenUriOfReturnedCookieIsNull() { Cookie cookie = new ReturnedCookie("name", "value", "", "/", null, false, null); }
public void ShouldAllowExpiryToBeNull() { Cookie cookie = new ReturnedCookie("name", "value", "", "/", null, false, new Uri("http://localhost")); }
public void CookiesShouldAllowSecureToBeSet() { Cookie cookie = new ReturnedCookie("name", "value", "", "/", DateTime.Now, true, new Uri("http://localhost")); Assert.IsTrue(cookie.Secure); }