コード例 #1
0
        public void TestFreeEngineFailure()
        {
            AutoUpdate updater = new AutoUpdate();

            updater.UserKey        = "";
            updater.CurrentVersion = testVersion;
            bool retVal = updater.DownloadFile("TickZoomEngine-" + testVersion + ".dll");

            Assert.IsFalse(retVal, "did download");
        }
コード例 #2
0
        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"));
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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."));
        }
コード例 #5
0
        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));
        }