public void TestFreeEngineFailure() { AutoUpdate updater = new AutoUpdate(); updater.UserKey = ""; updater.CurrentVersion = testVersion; bool retVal = updater.DownloadFile("TickZoomEngine-" + testVersion + ".dll"); Assert.IsFalse(retVal, "did download"); }
public void TestBadFile() { AutoUpdate updater = new AutoUpdate(); updater.CurrentVersion = testVersion; bool retVal = updater.DownloadFile("TickZoomEngine.dllXXX"); Assert.IsFalse(retVal, "did download"); Assert.IsTrue(updater.Message.StartsWith("File TickZoomEngine")); Assert.IsTrue(updater.Message.EndsWith("not found for membership Gold.\n")); }
public void TestBadKey() { AutoUpdate updater = new AutoUpdate(); updater.CurrentVersion = testVersion; updater.UserKey = @"Bad Key"; bool retVal = updater.DownloadFile("TickZoomEngine.dll"); Assert.IsFalse(retVal, "did download"); Assert.AreEqual("Your user key was not found. Please verify that you have a valid key.\n", updater.Message); }
public void TestKeyNotFound() { AutoUpdate updater = new AutoUpdate(); updater.UserKey = "BadKey"; updater.CurrentVersion = testVersion; bool retVal = updater.DownloadFile("TickZoomEngine.dll"); Assert.IsFalse(retVal, "did download"); Assert.IsTrue(updater.Message.StartsWith("Your user key was not found. Please verify that you have a valid key.")); }
public void TestFreeEngineSuccess() { AutoUpdate updater = new AutoUpdate(); // updater.UserKey = ""; updater.CurrentVersion = testVersion; bool retVal = updater.DownloadFile("TickZoomEngine-" + testVersion + ".dll"); Assert.IsTrue(retVal, "did download"); Assert.AreEqual("", updater.Message); string appData = Factory.Settings["AppDataFolder"]; string dllFile = appData + Path.DirectorySeparatorChar + @"AutoUpdate\" + updater.CurrentVersion + Path.DirectorySeparatorChar + "TickZoomEngine-" + updater.CurrentVersion + ".dll.zip"; Assert.IsTrue(File.Exists(dllFile)); }