Equals() public method

public Equals ( object comparand ) : bool
comparand object
return bool
        public void SetCookieCollectionFilledWithCookiesOnDispose() {
            var cookie = new Cookie("name", "value", this.url.AbsolutePath, this.url.Host);
            using (var auth = new PersistentStandardAuthenticationProvider(this.storage.Object, this.url)) {
                auth.Cookies.Add(cookie);
            }

            this.storage.VerifySet(s => s.Cookies = It.Is<CookieCollection>(cc => cc.Count == 1 && cookie.Equals(cc[0])));
        }
Ejemplo n.º 2
0
        public void Equals ()
        {
		Cookie c1 = new Cookie ("NAME", "VALUE", "PATH", "DOMAIN");
		Cookie c2 = new Cookie ("name", "value", "path", "domain");
		Assertion.Assert("#1", !c1.Equals (c2));
		c2.Value = "VALUE";
		c2.Path = "PATH";
		Assertion.Assert("#2", c1.Equals (c2));
		c2.Version = 1;
		Assertion.Assert("#3", !c1.Equals (c2));
        }