Exemplo n.º 1
0
        public void CanDownloadPackage()
        {
            string appPathBase;
            using (CreateTempTestPath(out appPathBase)) {
                var sut = new UpdateManager(APP_NAME, null, PackageSource, appPathBase, _nuGetCachePathForTests);
                var latestUpdate = sut.CheckForUpdate();
                sut.DownloadPackage(latestUpdate);

                Assert.IsTrue(File.Exists(Path.Combine(_nuGetCachePathForTests, @"DemoApp.2.0.0.0.nupkg")), "Cannot find package in packages folder.");
            }
        }
Exemplo n.º 2
0
        public void CanApplyPackage()
        {
            string appPathBase;
            using (CreateTempTestPath(out appPathBase)) {
                var sut = new UpdateManager(APP_NAME, null, PackageSource, appPathBase, _nuGetCachePathForTests);
                var latestUpdate = sut.CheckForUpdate();
                sut.DownloadPackage(latestUpdate);
                sut.ApplyUpdate(latestUpdate);

                Assert.IsTrue(File.Exists(Path.Combine(appPathBase, @"app-2.0.0.0\DemoApp.exe")));
            }
        }