parent
d17f4ec94e
commit
d681933b87
35 changed files with 224 additions and 224 deletions
|
@ -85,10 +85,10 @@ namespace Microsoft.DotNet.Tests.Commands
|
|||
public void WhenRunWithPackageIdWithSourceItShouldCreateValidShim()
|
||||
{
|
||||
const string sourcePath = "http://mysouce.com";
|
||||
ParseResult result = Parser.Instance.Parse($"dotnet tool install -g {PackageId} --source-feed {sourcePath}");
|
||||
ParseResult result = Parser.Instance.Parse($"dotnet tool install -g {PackageId} --add-source {sourcePath}");
|
||||
AppliedOption appliedCommand = result["dotnet"]["tool"]["install"];
|
||||
ParseResult parseResult =
|
||||
Parser.Instance.ParseFrom("dotnet tool", new[] { "install", "-g", PackageId, "--source-feed", sourcePath });
|
||||
Parser.Instance.ParseFrom("dotnet tool", new[] { "install", "-g", PackageId, "--add-source", sourcePath });
|
||||
|
||||
|
||||
var toolToolPackageInstaller = CreateToolPackageInstaller(
|
||||
|
|
|
@ -55,10 +55,10 @@ namespace Microsoft.DotNet.Tests.ParserTests
|
|||
const string expectedSourceValue = "TestSourceValue";
|
||||
|
||||
var result =
|
||||
Parser.Instance.Parse($"dotnet tool install -g --source-feed {expectedSourceValue} console.test.app");
|
||||
Parser.Instance.Parse($"dotnet tool install -g --add-source {expectedSourceValue} console.test.app");
|
||||
|
||||
var appliedOptions = result["dotnet"]["tool"]["install"];
|
||||
appliedOptions.ValueOrDefault<string[]>("source-feed").First().Should().Be(expectedSourceValue);
|
||||
appliedOptions.ValueOrDefault<string[]>("add-source").First().Should().Be(expectedSourceValue);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -70,13 +70,13 @@ namespace Microsoft.DotNet.Tests.ParserTests
|
|||
var result =
|
||||
Parser.Instance.Parse(
|
||||
$"dotnet tool install -g " +
|
||||
$"--source-feed {expectedSourceValue1} " +
|
||||
$"--source-feed {expectedSourceValue2} console.test.app");
|
||||
$"--add-source {expectedSourceValue1} " +
|
||||
$"--add-source {expectedSourceValue2} console.test.app");
|
||||
|
||||
var appliedOptions = result["dotnet"]["tool"]["install"];
|
||||
|
||||
appliedOptions.ValueOrDefault<string[]>("source-feed")[0].Should().Be(expectedSourceValue1);
|
||||
appliedOptions.ValueOrDefault<string[]>("source-feed")[1].Should().Be(expectedSourceValue2);
|
||||
appliedOptions.ValueOrDefault<string[]>("add-source")[0].Should().Be(expectedSourceValue1);
|
||||
appliedOptions.ValueOrDefault<string[]>("add-source")[1].Should().Be(expectedSourceValue2);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
|
@ -62,10 +62,10 @@ namespace Microsoft.DotNet.Tests.ParserTests
|
|||
const string expectedSourceValue = "TestSourceValue";
|
||||
|
||||
var result =
|
||||
Parser.Instance.Parse($"dotnet tool update -g --source-feed {expectedSourceValue} console.test.app");
|
||||
Parser.Instance.Parse($"dotnet tool update -g --add-source {expectedSourceValue} console.test.app");
|
||||
|
||||
var appliedOptions = result["dotnet"]["tool"]["update"];
|
||||
appliedOptions.ValueOrDefault<string[]>("source-feed").First().Should().Be(expectedSourceValue);
|
||||
appliedOptions.ValueOrDefault<string[]>("add-source").First().Should().Be(expectedSourceValue);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -77,13 +77,13 @@ namespace Microsoft.DotNet.Tests.ParserTests
|
|||
var result =
|
||||
Parser.Instance.Parse(
|
||||
$"dotnet tool update -g " +
|
||||
$"--source-feed {expectedSourceValue1} " +
|
||||
$"--source-feed {expectedSourceValue2} console.test.app");
|
||||
$"--add-source {expectedSourceValue1} " +
|
||||
$"--add-source {expectedSourceValue2} console.test.app");
|
||||
|
||||
var appliedOptions = result["dotnet"]["tool"]["update"];
|
||||
|
||||
appliedOptions.ValueOrDefault<string[]>("source-feed")[0].Should().Be(expectedSourceValue1);
|
||||
appliedOptions.ValueOrDefault<string[]>("source-feed")[1].Should().Be(expectedSourceValue2);
|
||||
appliedOptions.ValueOrDefault<string[]>("add-source")[0].Should().Be(expectedSourceValue1);
|
||||
appliedOptions.ValueOrDefault<string[]>("add-source")[1].Should().Be(expectedSourceValue2);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue