public async Task SetupAsync()
        {
            commandDirectoryCleanup = new CommandDirectoryCleanup();
            baseDir   = commandDirectoryCleanup.CommandDirectory.BaseDir;
            installer = new Installer(commandDirectoryCleanup.CommandDirectory);
            installed = await installer.InstallAsync(packageName, null, force : false, includePreRelease : true);

            installed.Should().BeTrue();
        }
Beispiel #2
0
        public async Task SetupAsync()
        {
            commandDirectoryCleanup = new CommandDirectoryCleanup();
            baseDir   = commandDirectoryCleanup.CommandDirectory.BaseDir;
            installer = new Installer(commandDirectoryCleanup.CommandDirectory);
            installed = await installer.InstallAsync(packageName, SemanticVersion.Parse("1.0.1"), force : false, includePreRelease : false);

            installed.Should().BeTrue();
        }
Beispiel #3
0
 public void OneTimeSetUp()
 {
     currentDirectoryWhenTestStarted = Directory.GetCurrentDirectory();
     tempPath = Path.Combine(Path.GetTempPath(), "DotNetTempPath" + Guid.NewGuid().ToString().Replace("-", "").Substring(0, 10));
     Directory.CreateDirectory(tempPath);
     Directory.SetCurrentDirectory(tempPath);
     commandDirectoryCleanup = new CommandDirectoryCleanup();
     downloader = new NugetDownloader(commandDirectoryCleanup.CommandDirectory);
 }
Beispiel #4
0
        public async Task SetupAsync()
        {
            commandDirectoryCleanup = new CommandDirectoryCleanup();
            baseDir = commandDirectoryCleanup.CommandDirectory.BaseDir;
            var installer = new Installer(commandDirectoryCleanup.CommandDirectory);
            var installed = await installer.InstallAsync(packageName, null, force : false, includePreRelease : false);

            installed.Should().BeTrue();
            GetLastWriteTimes();
            var updater      = new Updater(commandDirectoryCleanup.CommandDirectory);
            var updateResult = await updater.UpdateAsync(packageName, force : false, includePreRelease : false);

            updateResult.Should().Be(Updater.UpdateResult.NotNeeded);
        }
        private async Task SetupAsync()
        {
            commandDirectoryCleanup = new CommandDirectoryCleanup();
            baseDir = commandDirectoryCleanup.CommandDirectory.BaseDir;
            var installer = new Installer(commandDirectoryCleanup.CommandDirectory);
            var installed = await installer.InstallAsync(packageName, null, force : false, includePreRelease : false);

            MoveToPreviousVersion();
            installed.Should().BeTrue();
            var updater      = new Updater(commandDirectoryCleanup.CommandDirectory);
            var updateResult = await updater.UpdateAsync(packageName, force : false, includePreRelease : false);

            updateResult.Should().Be(Updater.UpdateResult.Success);
        }
        public async Task SetupAsync()
        {
            isVerbose = Logger.IsVerbose;
            commandDirectoryCleanup = new CommandDirectoryCleanup();
            var baseDir   = commandDirectoryCleanup.CommandDirectory.BaseDir;
            var installer = new Installer(commandDirectoryCleanup.CommandDirectory);
            var installed = await installer.InstallAsync("dotnet-foo", null, force : false, includePreRelease : false);

            installed.Should().BeTrue();
            installed = await installer.InstallAsync("dotnet-bar", null, force : false, includePreRelease : false);

            installed.Should().BeTrue();
            logger           = new Mock <Action <string> >();
            Logger.IsVerbose = false;
            Logger.SetLogger(logger.Object);
            var lister = new Lister(commandDirectoryCleanup.CommandDirectory);
            await lister.ListAsync();
        }
 public void ClassInitialize()
 {
     commandDirectoryCleanup = new CommandDirectoryCleanup();
     downloader = new NugetDownloader(commandDirectoryCleanup.CommandDirectory);
 }