dotnet-installer/test/dotnet-install-tool.Tests/GivenDotnetInstallTool.cs
William Lee 149bdfd0fa
Change command order for tools (#8862)
dotnet install tool -> dotnet tool install
dotnet uninstall tool -> dotnet tool uninstall
dotnet list tool -> dotnet tool list
dotnet update tool -> dotnet tool update
2018-03-21 19:12:32 -07:00

42 lines
1.2 KiB
C#

// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using FluentAssertions;
using Microsoft.DotNet.Tools.Test.Utilities;
using Xunit;
namespace Microsoft.DotNet.Cli.Install.Tests
{
public class GivenDotnetInstallTool : TestBase
{
[Fact]
public void ItRunsWithQuietVerbosityByDefault()
{
var result = new ToolCommand()
.ExecuteWithCapturedOutput("install -g nonexistent_tool_package");
result
.Should()
.Fail()
.And
.NotHaveStdOutContaining("Restoring");
}
[Fact]
public void ItRunsWithTheSpecifiedVerbosity()
{
var result = new ToolCommand()
.ExecuteWithCapturedOutput("install -g -v:m nonexistent_tool_package");
result
.Should()
.Fail();
result
.StdOut
.Should()
.ContainVisuallySameFragmentIfNotLocalized("Restoring");
}
}
}