Skip to content

Commit e46074b

Browse files
committed
Update template test expectations for new @ version syntax
1 parent f7e76ec commit e46074b

10 files changed

+62
-62
lines changed

test/dotnet-new.IntegrationTests/Approvals/DotnetNewInstallTests.CanInstallPackageAvailableFromBuiltInsWithForce.verified.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
The following template packages will be installed:
2-
Microsoft.DotNet.Common.ItemTemplates::%VERSION%
2+
Microsoft.DotNet.Common.ItemTemplates@%VERSION%
33

44
Installing the template package(s) will override the available template package(s).
55
The following template package(s) are already available:
66
Microsoft.DotNet.Common.ItemTemplates@%VERSION%
77

8-
Success: Microsoft.DotNet.Common.ItemTemplates::6.0.100 installed the following templates:
8+
Success: Microsoft.DotNet.Common.ItemTemplates@6.0.100 installed the following templates:
99
Template Name Short Name Language Tags
1010
------------------------------- ------------- -------- --------
1111
dotnet gitignore file gitignore Config

test/dotnet-new.IntegrationTests/Approvals/DotnetNewInstallTests.CanInstallSameSourceTwice_RemoteNuGet_WhenSourceIsSpecified.verified.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
The following template packages will be installed:
2-
Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0
2+
Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0
33

44
Microsoft.DotNet.Common.ProjectTemplates.5.0 (version 5.0.0) is already installed, it will be replaced with version 5.0.0.
5-
Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0 was successfully uninstalled.
6-
Success: Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0 installed the following templates:
5+
Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0 was successfully uninstalled.
6+
Success: Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0 installed the following templates:
77
Template Name Short Name Language Tags
88
------------------- ---------- ---------- --------------
99
Class library classlib [C#],F#,VB Common/Library

test/dotnet-new.IntegrationTests/Approvals/DotnetNewInstallTests.CanShowDeprecationMessage_WhenLegacyCommandIsUsed_common.verified.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ For more information, run:
33
dotnet new install -h
44

55
The following template packages will be installed:
6-
Microsoft.DotNet.Web.ItemTemplates::5.0.0
6+
Microsoft.DotNet.Web.ItemTemplates@5.0.0
77

8-
Success: Microsoft.DotNet.Web.ItemTemplates::5.0.0 installed the following templates:
8+
Success: Microsoft.DotNet.Web.ItemTemplates@5.0.0 installed the following templates:
99
Template Name Short Name Language Tags
1010
-------------------- -------------- -------- -----------
1111
MVC ViewImports viewimports [C#] Web/ASP.NET

test/dotnet-new.IntegrationTests/Approvals/DotnetNewInstallTests.CannotInstallMultiplePackageAvailableFromBuiltIns.verified.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ The following template package(s) are already available:
33
Microsoft.DotNet.Common.ItemTemplates@%VERSION%
44

55
To install the template package(s) anyway, apply '--force' option:
6-
dotnet new install Microsoft.DotNet.Common.ItemTemplates::6.0.100 Microsoft.DotNet.Web.ItemTemplates::5.0.0 --force
6+
dotnet new install Microsoft.DotNet.Common.ItemTemplates@6.0.100 Microsoft.DotNet.Web.ItemTemplates@5.0.0 --force
77

88
For details on the exit code, refer to https://aka.ms/templating-exit-codes#106

test/dotnet-new.IntegrationTests/Approvals/DotnetNewInstallTests.CannotInstallPackageAvailableFromBuiltIns.verified.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ The following template package(s) are already available:
33
Microsoft.DotNet.Common.ItemTemplates@%VERSION%
44

55
To install the template package(s) anyway, apply '--force' option:
6-
dotnet new install Microsoft.DotNet.Common.ItemTemplates::6.0.100 --force
6+
dotnet new install Microsoft.DotNet.Common.ItemTemplates@6.0.100 --force
77

88
For details on the exit code, refer to https://aka.ms/templating-exit-codes#106
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0 is already installed.
1+
Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0 is already installed.
22
To reinstall the same version of the template package, use '--force' option:
3-
dotnet new install Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0 --force
3+
dotnet new install Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0 --force
44

55
For details on the exit code, refer to https://aka.ms/templating-exit-codes#106

test/dotnet-new.IntegrationTests/Approvals/DotnetNewInstallTests.DoNotShowDeprecationMessage_WhenNewCommandIsUsed.verified.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The following template packages will be installed:
2-
Microsoft.DotNet.Web.ItemTemplates::5.0.0
2+
Microsoft.DotNet.Web.ItemTemplates@5.0.0
33

4-
Success: Microsoft.DotNet.Web.ItemTemplates::5.0.0 installed the following templates:
4+
Success: Microsoft.DotNet.Web.ItemTemplates@5.0.0 installed the following templates:
55
Template Name Short Name Language Tags
66
-------------------- -------------- -------- -----------
77
MVC ViewImports viewimports [C#] Web/ASP.NET

test/dotnet-new.IntegrationTests/DotnetNewInstallTests.cs

Lines changed: 29 additions & 29 deletions
Large diffs are not rendered by default.

test/dotnet-new.IntegrationTests/DotnetNewUninstallTests.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public void CanListInstalledSources_Folder(string commandName)
4545
public void CanListInstalledSources_NuGet(string commandName)
4646
{
4747
string home = CreateTemporaryFolder(folderName: "Home");
48-
new DotnetNewCommand(_log, "-i", "Microsoft.DotNet.Web.ProjectTemplates.5.0::5.0.0")
48+
new DotnetNewCommand(_log, "-i", "Microsoft.DotNet.Web.ProjectTemplates.5.0@5.0.0")
4949
.WithCustomHive(home)
5050
.WithWorkingDirectory(CreateTemporaryFolder())
5151
.Execute()
@@ -140,7 +140,7 @@ public void CanUninstall_Folder(string commandName)
140140
public void CanUninstall_NuGet(string commandName)
141141
{
142142
string home = CreateTemporaryFolder(folderName: "Home");
143-
new DotnetNewCommand(_log, "-i", "Microsoft.DotNet.Web.ProjectTemplates.5.0::5.0.0")
143+
new DotnetNewCommand(_log, "-i", "Microsoft.DotNet.Web.ProjectTemplates.5.0@5.0.0")
144144
.WithCustomHive(home)
145145
.WithWorkingDirectory(CreateTemporaryFolder())
146146
.Execute()
@@ -181,7 +181,7 @@ public void CanUninstall_NuGet(string commandName)
181181
.ExitWith(0)
182182
.And
183183
.NotHaveStdErr()
184-
.And.HaveStdOutContaining($"Success: Microsoft.DotNet.Web.ProjectTemplates.5.0::5.0.0 was uninstalled.");
184+
.And.HaveStdOutContaining($"Success: Microsoft.DotNet.Web.ProjectTemplates.5.0@5.0.0 was uninstalled.");
185185

186186
new DotnetNewCommand(_log, commandName)
187187
.WithCustomHive(home)
@@ -225,7 +225,7 @@ public void CanUninstallSeveralSources_LegacySyntax()
225225
.ExitWith(0)
226226
.And
227227
.NotHaveStdErr()
228-
.And.HaveStdOutMatching($"^Success: Microsoft\\.DotNet\\.Common\\.ProjectTemplates\\.5\\.0::([\\d\\.a-z-])+ was uninstalled\\.\\s*$", RegexOptions.Multiline)
228+
.And.HaveStdOutMatching($"^Success: Microsoft\\.DotNet\\.Common\\.ProjectTemplates\\.5\\.0@([\\d\\.a-z-])+ was uninstalled\\.\\s*$", RegexOptions.Multiline)
229229
.And.HaveStdOutContaining($"Success: {basicFSharp} was uninstalled.");
230230

231231
new DotnetNewCommand(_log, "-u")
@@ -271,7 +271,7 @@ public void CanUninstallSeveralSources()
271271
.ExitWith(0)
272272
.And
273273
.NotHaveStdErr()
274-
.And.HaveStdOutMatching($"^Success: Microsoft\\.DotNet\\.Common\\.ProjectTemplates\\.5\\.0::([\\d\\.a-z-])+ was uninstalled\\.\\s*$", RegexOptions.Multiline)
274+
.And.HaveStdOutMatching($"^Success: Microsoft\\.DotNet\\.Common\\.ProjectTemplates\\.5\\.0@([\\d\\.a-z-])+ was uninstalled\\.\\s*$", RegexOptions.Multiline)
275275
.And.HaveStdOutContaining($"Success: {basicFSharp} was uninstalled.");
276276

277277
new DotnetNewCommand(_log, "uninstall")
@@ -294,7 +294,7 @@ public void CanUninstallSeveralSources()
294294
public void CannotUninstallUnknownPackage(string commandName)
295295
{
296296
string home = CreateTemporaryFolder(folderName: "Home");
297-
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Web.ProjectTemplates.5.0::5.0.0")
297+
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Web.ProjectTemplates.5.0@5.0.0")
298298
.WithCustomHive(home)
299299
.WithWorkingDirectory(CreateTemporaryFolder())
300300
.Execute()
@@ -322,7 +322,7 @@ public void CannotUninstallUnknownPackage(string commandName)
322322
public void CannotUninstallByTemplateName(string commandName)
323323
{
324324
string home = CreateTemporaryFolder(folderName: "Home");
325-
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0")
325+
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0")
326326
.WithCustomHive(home)
327327
.WithWorkingDirectory(CreateTemporaryFolder())
328328
.Execute()
@@ -338,7 +338,7 @@ public void CannotUninstallByTemplateName(string commandName)
338338
.Should().Fail()
339339
.And.HaveStdErrContaining("The template package 'console' is not found")
340340
.And.HaveStdErrContaining("The template 'console' is included to the packages:")
341-
.And.HaveStdErrContaining(" Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0 (contains 2 templates)")
341+
.And.HaveStdErrContaining(" Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0 (contains 2 templates)")
342342
// .And.HaveStdErrContaining("To list the templates installed in a package, use dotnet new <new option> <package name>")
343343
.And.HaveStdErrContaining("To uninstall the template package use:")
344344
.And.HaveStdErrContaining(" dotnet new uninstall Microsoft.DotNet.Common.ProjectTemplates.5.0");
@@ -350,7 +350,7 @@ public void CannotUninstallByTemplateName(string commandName)
350350
public void CannotUninstallByTemplateName_ShowsAllPackages(string commandName)
351351
{
352352
string home = CreateTemporaryFolder(folderName: "Home");
353-
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0")
353+
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0")
354354
.WithCustomHive(home).WithoutBuiltInTemplates()
355355
.WithWorkingDirectory(CreateTemporaryFolder())
356356
.Execute()
@@ -359,7 +359,7 @@ public void CannotUninstallByTemplateName_ShowsAllPackages(string commandName)
359359
.And
360360
.NotHaveStdErr();
361361

362-
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.3.1::5.0.0")
362+
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.3.1@5.0.0")
363363
.WithCustomHive(home).WithoutBuiltInTemplates()
364364
.WithWorkingDirectory(CreateTemporaryFolder())
365365
.Execute()
@@ -375,8 +375,8 @@ public void CannotUninstallByTemplateName_ShowsAllPackages(string commandName)
375375
.Should().Fail()
376376
.And.HaveStdErrContaining("The template package 'console' is not found")
377377
.And.HaveStdErrContaining("The template 'console' is included to the packages:")
378-
.And.HaveStdErrContaining(" Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0 (contains 2 templates)")
379-
.And.HaveStdErrContaining(" Microsoft.DotNet.Common.ProjectTemplates.3.1::5.0.0 (contains 2 templates)")
378+
.And.HaveStdErrContaining(" Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0 (contains 2 templates)")
379+
.And.HaveStdErrContaining(" Microsoft.DotNet.Common.ProjectTemplates.3.1@5.0.0 (contains 2 templates)")
380380
.And.HaveStdErrContaining("To uninstall the template package use:")
381381
.And.HaveStdErrContaining(" dotnet new uninstall Microsoft.DotNet.Common.ProjectTemplates.");
382382
}

test/dotnet-new.IntegrationTests/DotnetNewUpdateTests.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public DotnetNewUpdateTests(ITestOutputHelper log) : base(log)
1919
public void CanCheckForUpdate(string testCase)
2020
{
2121
string home = CreateTemporaryFolder(folderName: "Home");
22-
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0")
22+
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0")
2323
.WithCustomHive(home).WithoutBuiltInTemplates()
2424
.WithWorkingDirectory(CreateTemporaryFolder())
2525
.Execute()
@@ -52,7 +52,7 @@ public void ReportsErrorOnUpdateCheckOfLocalPackage()
5252
{
5353
string nugetName = "TestNupkgInstallTemplate";
5454
string nugetVersion = "0.0.1";
55-
string nugetFullName = $"{nugetName}::{nugetVersion}";
55+
string nugetFullName = $"{nugetName}@{nugetVersion}";
5656
string nugetFileName = $"{nugetName}.{nugetVersion}.nupkg";
5757
string workingDirectory = CreateTemporaryFolder();
5858
string home = CreateTemporaryFolder(folderName: "Home");
@@ -111,7 +111,7 @@ public void DoesNotShowUpdatesWhenAllTemplatesAreUpToDate(string testCase)
111111
public void PrintInfoOnUpdateOnCreation()
112112
{
113113
string home = CreateTemporaryFolder(folderName: "Home");
114-
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0")
114+
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0")
115115
.WithCustomHive(home).WithoutBuiltInTemplates()
116116
.WithWorkingDirectory(CreateTemporaryFolder())
117117
.Execute()
@@ -141,7 +141,7 @@ public void PrintInfoOnUpdateOnCreation()
141141
public void DoesNotPrintUpdateInfoOnCreation_WhenNoUpdateCheckOption()
142142
{
143143
string home = CreateTemporaryFolder(folderName: "Home");
144-
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0")
144+
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0")
145145
.WithCustomHive(home).WithoutBuiltInTemplates()
146146
.WithWorkingDirectory(CreateTemporaryFolder())
147147
.Execute()
@@ -251,7 +251,7 @@ public void DoNotShowDeprecationMessage_WhenNewCommandIsUsed_Check()
251251
public void CanApplyUpdates(string testCase)
252252
{
253253
string home = CreateTemporaryFolder(folderName: "Home");
254-
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0")
254+
new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0")
255255
.WithCustomHive(home).WithoutBuiltInTemplates()
256256
.WithWorkingDirectory(CreateTemporaryFolder())
257257
.Execute()
@@ -287,9 +287,9 @@ public void CanApplyUpdates(string testCase)
287287
.And
288288
.NotHaveStdErr()
289289
.And.HaveStdOutContaining("The following template packages will be updated:")
290-
.And.HaveStdOutContaining("Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0 was successfully uninstalled")
291-
.And.NotHaveStdOutContaining("Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0 is already installed and will be replaced with version")
292-
.And.HaveStdOutMatching($"^Success: Microsoft\\.DotNet\\.Common\\.ProjectTemplates\\.5\\.0::([\\d\\.a-z-])+ installed the following templates:\\s*$", System.Text.RegularExpressions.RegexOptions.Multiline)
290+
.And.HaveStdOutContaining("Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0 was successfully uninstalled")
291+
.And.NotHaveStdOutContaining("Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0 is already installed and will be replaced with version")
292+
.And.HaveStdOutMatching($"^Success: Microsoft\\.DotNet\\.Common\\.ProjectTemplates\\.5\\.0@([\\d\\.a-z-])+ installed the following templates:\\s*$", System.Text.RegularExpressions.RegexOptions.Multiline)
293293
.And.HaveStdOutContaining("console")
294294
.And.HaveStdOutContaining("Console App");
295295
}

0 commit comments

Comments
 (0)