Rename --source-feed to --add-source (#9164)

* Rename to add-source
This commit is contained in:
William Li 2018-05-01 10:21:00 -07:00 committed by GitHub
parent d17f4ec94e
commit d681933b87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 224 additions and 224 deletions

View file

@ -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(

View file

@ -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]

View file

@ -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]