public void SetAndGetEmptyCookieCollection() { var storage = new PersistentCookieStorage(this.engine); storage.Cookies = new CookieCollection(); Assert.That(storage.Cookies, Is.Empty); }
public void SetAndGetCookieCollectionsAreEqual() { var storage = new PersistentCookieStorage(this.engine); var collection = new CookieCollection(); collection.Add(new Cookie { Name = "test", Expired = false, Expires = DateTime.Now.AddDays(1) }); storage.Cookies = collection; Assert.That(storage.Cookies, Is.EqualTo(collection)); }
public void SaveCookieWithoutExpirationDate() { var storage = new PersistentCookieStorage(this.engine); var collection = new CookieCollection(); collection.Add(new Cookie { Name = "JSESSIONID", Value = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", Path = "/cmis", Expired = false }); storage.Cookies = collection; Assert.That(storage.Cookies, Is.EqualTo(collection)); }
public void SetCookieCollectionToNullCleansCollection() { var storage = new PersistentCookieStorage(this.engine); var collection = new CookieCollection(); collection.Add(new Cookie { Name = "test", Expired = false, Expires = DateTime.Now.AddDays(1) }); storage.Cookies = collection; storage.Cookies = null; Assert.That(storage.Cookies, Is.Empty); }
public static IDisposableAuthProvider CreateAuthProvider(Config.AuthenticationType type, Uri url, DBreezeEngine db) { ICookieStorage storage = new PersistentCookieStorage(db); switch (type) { case Config.AuthenticationType.BASIC: return(new PersistentStandardAuthenticationProvider(storage, url)); case Config.AuthenticationType.KERBEROS: goto case Config.AuthenticationType.NTLM; case Config.AuthenticationType.NTLM: return(new PersistentNtlmAuthenticationProvider(storage, url)); default: return(new StandardAuthenticationProviderWrapper()); } }
public void GetCookieCollectionReturnEmptyCollectionOnNewDatabase() { var storage = new PersistentCookieStorage(this.engine); Assert.That(storage.Cookies, Is.Empty); }