public void TestGetUrlSuccess() { AllDebrid debrid = new AllDebrid(username: this.username, password: this.password); var result = debrid.GetUrlDebride(url: "http://uptobox.com/4uf113r6fmwg"); Assert.IsNotNull(result); Assert.IsInstanceOfType(result, typeof(Link)); }
public void TestLoginFail() { AllDebrid all = new AllDebrid(username: this.username, password: "******"); PrivateObject obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(all); var result = obj.Invoke("Login", "WrongUsername", "WrongPassword"); Assert.IsFalse((bool)result); Assert.IsNull(obj.GetField("_cookie")); }
public void TestLoginSuccess() { AllDebrid all = new AllDebrid(username: this.username, password: this.password); PrivateObject obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(all); var result = obj.Invoke("Login", this.username, this.password); var attrCookie = obj.GetFieldOrProperty("_cookie"); var attrDaysLeft = obj.GetFieldOrProperty("daysLeft"); Assert.IsNotNull(attrCookie); Assert.IsTrue((bool)result); Assert.IsNotNull(attrDaysLeft); }