469 instantiations of DotnetNewCommand
dotnet.Tests (11)
CommandTests\Pack\PackTests.cs (1)
241new DotnetNewCommand(Log, "console", "-o", rootPath, "--no-restore")
CommandTests\Reference\Add\GivenDotnetAddReference.cs (1)
72new DotnetNewCommand(Log, "classlib", "-o", projDir.Path, "--no-restore")
CommandTests\Reference\List\GivenDotnetListReference.cs (1)
247new DotnetNewCommand(Log, "classlib", "-o", dir.Path, "--no-restore")
CommandTests\Reference\Remove\GivenDotnetRemoveP2P.cs (1)
73new DotnetNewCommand(Log)
CommandTests\Restore\GivenThatIWantToRestoreApp.cs (2)
135new DotnetNewCommand(Log) 159new DotnetNewCommand(Log)
CommandTests\Run\GivenDotnetRunBuildsCsProj.cs (1)
227new DotnetNewCommand(Log)
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestFromCsprojForMultipleTFM.cs (1)
165new DotnetNewCommand(Log, "sln")
CommandTests\Tool\Install\ToolInstallCommandTests.cs (2)
46new DotnetNewCommand(Log, "tool-manifest").WithCustomHive("/tmp/folder").WithWorkingDirectory("/tmp/folder").Execute().Should().Pass(); 51new DotnetNewCommand(Log, "tool-manifest").WithCustomHive("/tmp/folder/sub").WithWorkingDirectory("/tmp/folder/sub").Execute().Should().Pass();
OutputPathOptionTests.cs (1)
52new DotnetNewCommand(Log)
dotnet-new.IntegrationTests (434)
BaseIntegrationTest.cs (2)
92DotnetNewCommand command = new DotnetNewCommand(log, "-i", packageName) 122DotnetNewCommand command = new DotnetNewCommand(log, "install", testTemplate)
CommonTemplatesTests.cs (1)
143new DotnetNewCommand(_log, templateShortName)
DotnetClassTemplateTests.cs (1)
213new DotnetNewCommand(Log, projectArgs.ToArray())
DotnetNewArgumentsTests.cs (2)
18var dotnetNewHelpOutput = new DotnetNewCommand(_log, "--help") 22new DotnetNewCommand(_log, "-v")
DotnetNewDebugOptionsTests.cs (9)
24CommandResult commandResult = new DotnetNewCommand(_log) 32CommandResult reinitCommandResult = new DotnetNewCommand(_log, "--debug:reinit") 48CommandResult commandResult = new DotnetNewCommand(_log) 56CommandResult reinitCommandResult = new DotnetNewCommand(_log, "--debug:rebuildcache") 70CommandResult commandResult = new DotnetNewCommand(_log, "--debug:show-config") 99new DotnetNewCommand(_log, "--debug:ephemeral-hive") 112new DotnetNewCommand(_log, "--debug:custom-hive", home) 127CommandResult commandResult = new DotnetNewCommand(_log, "list", "--debug:disable-sdk-templates") 141CommandResult commandResult = new DotnetNewCommand(_log, "console", "--debug:disable-sdk-templates")
DotnetNewDetailsTest.Approval.cs (12)
19CommandResult commandResult = new DotnetNewCommand(_log, "details", _nuGetPackageId, "--version", "4.8.0-dev.604") 36var createCommandResult = () => new DotnetNewCommand(_log, "details", _nuGetPackageId) 64CommandResult commandResult = new DotnetNewCommand(_log, "details", "Microsoft.Azure.WebJobs.ItemTemplates", "--version", "4.0.2288") 82CommandResult commandResult = new DotnetNewCommand(_log, "details", packageName) 101new DotnetNewCommand(_log, "install", packageLocation) 110CommandResult commandResult = new DotnetNewCommand(_log, "details", "Microsoft.TemplateEngine.TestTemplates") 128new DotnetNewCommand(_log, "install", _nuGetPackageId, "--nuget-source", "https://api.nuget.org/v3/index.json") 136CommandResult commandResult = new DotnetNewCommand(_log, "details", _nuGetPackageId) 155new DotnetNewCommand(_log, "install", packageName) 163CommandResult commandResult = new DotnetNewCommand(_log, "details", packageName) 182new DotnetNewCommand(_log, "install", basicFSharp) 189CommandResult commandResult = new DotnetNewCommand(_log, "details", basicFSharp)
DotnetNewDetailsTest.cs (3)
22new DotnetNewCommand(_log, "install", packageLocation) 30new DotnetNewCommand(_log, "details", "Microsoft.TemplateEngine.TestTemplates") 51new DotnetNewCommand(_log, "details", nonexistantPackageName)
DotnetNewHelpTests.Approval.cs (23)
20CommandResult commandResult = new DotnetNewCommand(_log, command) 40CommandResult commandResult = new DotnetNewCommand(_log, "create", option) 60CommandResult commandResult = new DotnetNewCommand(_log, "install", option) 80CommandResult commandResult = new DotnetNewCommand(_log, "update", option) 100CommandResult commandResult = new DotnetNewCommand(_log, "uninstall", option) 120CommandResult commandResult = new DotnetNewCommand(_log, "list", option) 140CommandResult commandResult = new DotnetNewCommand(_log, "search", option) 163CommandResult commandResult = new DotnetNewCommand(_log, command.Split(" ")) 184CommandResult commandResult = new DotnetNewCommand(_log, "classli", "-h") 198CommandResult commandResult = new DotnetNewCommand(_log, "Console App", "-h") 215CommandResult commandResult = new DotnetNewCommand(_log, "basic", "--help") 231CommandResult commandResult = new DotnetNewCommand(_log, "TestAssets.TemplateWithMultiValueChoice", "--help") 246CommandResult commandResult = new DotnetNewCommand(_log, "console", "--help", "--framework", "net7.0") 264CommandResult commandResult = new DotnetNewCommand(_log, "console", "--help", "--framework") 279CommandResult commandResult = new DotnetNewCommand(_log, "console", "--help", "--do-not-exist") 294CommandResult commandResult = new DotnetNewCommand(_log, "console", "--help", "--langVersion", "8.0") 309CommandResult commandResult = new DotnetNewCommand(_log, "console", "--help", "--language", "F#") 327CommandResult commandResult = new DotnetNewCommand(_log, "console", "--help", "--langVersion") 346CommandResult commandResult = new DotnetNewCommand(_log, templateName, "--help") 361CommandResult commandResult = new DotnetNewCommand(_log, "TestAssets.TemplateWithRequiredParameters", "--help") 380CommandResult commandResult = new DotnetNewCommand(_log, "TestAssets.TemplateWithConditionalParameters", "--help") 399CommandResult commandResult = new DotnetNewCommand(_log, "basic", "--help") 418CommandResult commandResult = new DotnetNewCommand(_log, "basic2", "--help")
DotnetNewHelpTests.cs (1)
22new DotnetNewCommand(_log, "globaljson", "--help")
DotnetNewInstallTests.Approval.cs (17)
13CommandResult commandResult = new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ItemTemplates@6.0.100") 32CommandResult commandResult = new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ItemTemplates@6.0.100", "--force") 51CommandResult commandResult = new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ItemTemplates@6.0.100", "Microsoft.DotNet.Web.ItemTemplates@5.0.0") 72CommandResult commandResult = new DotnetNewCommand(_log, commandName, "Microsoft.DotNet.Web.ItemTemplates@5.0.0") 89CommandResult commandResult = new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Web.ItemTemplates@5.0.0") 105CommandResult commandResult = new DotnetNewCommand(_log, "install", testTemplateLocation) 127new DotnetNewCommand(_log, "install", basicFSharp) 134CommandResult commandResult = new DotnetNewCommand(_log, "install", basicFSharp, "--force") 149new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0") 156CommandResult commandResult = new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0", "--force") 170new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0") 181CommandResult commandResult = new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.0") 195new DotnetNewCommand(_log, "install", basicFSharp) 205new DotnetNewCommand(_log, "install", basicFSharp) 212CommandResult commandResult = new DotnetNewCommand(_log, "install", basicFSharp) 228CommandResult commandResult = new DotnetNewCommand(_log, "install", templateToInstall) 251CommandResult commandResult = new DotnetNewCommand(_log, "install", templateToInstall)
DotnetNewInstallTests.cs (33)
29new DotnetNewCommand(_log, commandName, "Microsoft.DotNet.Web.ProjectTemplates.5.0") 65CommandResult command1 = new DotnetNewCommand(_log, commandName, "Microsoft.DotNet.Common.ProjectTemplates.5.0") 70CommandResult command2 = new DotnetNewCommand(_log, commandName, $"Microsoft.DotNet.Common.ProjectTemplates.5.0@") 75CommandResult command3 = new DotnetNewCommand(_log, commandName, $"Microsoft.DotNet.Common.ProjectTemplates.5.0@*") 108new DotnetNewCommand(_log, commandName, "Microsoft.DotNet.Web.ProjectTemplates.5.0::5.0.0") 129CommandResult command1 = new DotnetNewCommand(_log, commandName, "Microsoft.DotNet.Common.ProjectTemplates.5.0@5.*") 134CommandResult command2 = new DotnetNewCommand(_log, commandName, "Microsoft.DotNet.Common.ProjectTemplates.5.0@5.0.*") 168new DotnetNewCommand(_log, "-i", "Microsoft.Azure.WebJobs.ProjectTemplates::4.0.1844-preview1", "--nuget-source", "https://api.nuget.org/v3/index.json") 187new DotnetNewCommand(_log, commandName, "Take.Blip.Client.Templates", "--nuget-source", "https://api.nuget.org/v3/index.json") 199new DotnetNewCommand(_log, commandName, "Take.Blip.Client.Templates", "--add-source", "https://api.nuget.org/v3/index.json") 219new DotnetNewCommand(_log, commandName, packageLocation) 236new DotnetNewCommand(_log, commandName, "Microsoft.DotNet.Web.ProjectTemplates.5.0") 260new DotnetNewCommand(_log, commandName, basicFSharp) 280new DotnetNewCommand(_log, commandName, "Microsoft.DotNet.Common.ProjectTemplates.5.0") 291new DotnetNewCommand(_log, commandName, "Microsoft.DotNet.Web.ProjectTemplates.5.0") 311new DotnetNewCommand(_log, commandName, "BlaBlaBla") 326new DotnetNewCommand(_log, commandName, "Microsoft.DotNet.Web.ProjectTemplates.5.0::16.0.0") 341new DotnetNewCommand(_log, "-i", "Microsoft.DotNet.Web.ProjectTemplates.5.0", "-i", "Microsoft.DotNet.Common.ProjectTemplates.5.0", "-i", basicFSharp, "-i", basicVB) 364new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Web.ProjectTemplates.5.0", "Microsoft.DotNet.Common.ProjectTemplates.5.0", basicFSharp, basicVB) 387new DotnetNewCommand(_log, installCommandName, "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0") 398new DotnetNewCommand(_log, uninstallCommandName) 410new DotnetNewCommand(_log, installCommandName, "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.1") 424new DotnetNewCommand(_log, uninstallCommandName) 454new DotnetNewCommand(_log, installCommandName, packageLocation) 464new DotnetNewCommand(_log, uninstallCommandName) 475new DotnetNewCommand(_log, installCommandName, "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0") 489new DotnetNewCommand(_log, uninstallCommandName) 512new DotnetNewCommand(_log, commandName, pattern) 535new DotnetNewCommand(_log, commandName, codebase) 549new DotnetNewCommand(_log, "-i", packageLocation) 560new DotnetNewCommand(_log, "-i", packageLocation) 577new DotnetNewCommand(_log, "-i", invalidTemplatePath) 594new DotnetNewCommand(_log, "-i", invalidTemplatePath)
DotnetNewInstantiateTests.Approval.cs (34)
14CommandResult commandResult = new DotnetNewCommand(_log, "unknownapp") 30CommandResult commandResult = new DotnetNewCommand(_log, "console", "--language", "D#") 46CommandResult commandResult = new DotnetNewCommand(_log, "console", "--type", "item") 67CommandResult commandResult = new DotnetNewCommand(_log, "basic") 88CommandResult commandResult = new DotnetNewCommand(_log, "basic") 117CommandResult commandResult = new DotnetNewCommand(_log, "Console App") 136CommandResult commandResult = new DotnetNewCommand(_log, "TestAssets.TemplateWithPreferDefaultNameButNoDefaultName") 154CommandResult commandResult = new DotnetNewCommand(_log, "console", "--fake") 172CommandResult commandResult = new DotnetNewCommand(_log, "console", "--framework", "fake") 190var commandResult = new DotnetNewCommand(_log, "console", "--framework", "net") 208CommandResult commandResult = new DotnetNewCommand(_log, "console", "--framework", "netcoreapp", "--fake") 229CommandResult commandResult = new DotnetNewCommand(_log, "basic") 269CommandResult commandResult = new DotnetNewCommand(_log, args) 293CommandResult commandResult = new DotnetNewCommand(_log, "TestAssets.TemplateWithMultiValueChoice", "--Platform", "") 316CommandResult commandResult = new DotnetNewCommand( 349CommandResult commandResult = new DotnetNewCommand(_log, "TestAssets.TemplateWithMultiValueChoice", "--Platform", "", "--Platform", "MacOS") 367new DotnetNewCommand(_log, "TestAssets.TemplateConditionalProcessing") 394CommandResult commandResult = new DotnetNewCommand(_log, "TestAssets.TemplateWithSourceNameAndCustomTargetPath", "-o", _OUT_FOLDER, "--dry-run") 425new DotnetNewCommand(_log, "console", "--name", "overwrite-test", "-o", "folderA") 434CommandResult commandResult = new DotnetNewCommand(_log, "console", "--name", "overwrite-test", "-o", "folderA") 471CommandResult commandResult = new DotnetNewCommand(_log, "TestAssets.Invalid.InvalidHostData") 496new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ItemTemplates@6.0.100", "--force") 502CommandResult commandResult = new DotnetNewCommand(_log, "gitignore") 527CommandResult commandResult = new DotnetNewCommand(_log, "sameshortname") 554CommandResult commandResult = new DotnetNewCommand(_log, "Constraints.RestrictedTemplate") 576CommandResult commandResult = new DotnetNewCommand(_log, "Constraints.RestrictedTemplate", "--force") 599new DotnetNewCommand(_log, "install", templateLocation) 609CommandResult commandResult = new DotnetNewCommand(_log, "TestAssets.TemplateWithSourceName") 629CommandResult commandResult = new DotnetNewCommand(_log, "cnsle") 645CommandResult commandResult = new DotnetNewCommand(_log, "uninstal") 665CommandResult commandResult = new DotnetNewCommand(_log, "create", "TestAssets.TemplateWithSourceName") 687CommandResult commandResult = new DotnetNewCommand(_log, parameters.Split("|")) 713CommandResult commandResult = new DotnetNewCommand(_log, parameters.Split("|")) 738CommandResult commandResult = new DotnetNewCommand(_log, parameters.Split("|"))
DotnetNewInstantiateTests.cs (30)
25new DotnetNewCommand(_log, "console") 43new DotnetNewCommand(_log, "console", "--alias", "csharpconsole") 52new DotnetNewCommand(_log, "console", "-n", "MyConsole", "-o", "no-alias") 61new DotnetNewCommand(_log, "csharpconsole", "-n", "MyConsole", "-o", "alias") 85new DotnetNewCommand(_log, "basic") 100Utils.CommandResult commandResult = new DotnetNewCommand(_log, "console", "--no-restore") 110Utils.CommandResult forceCommandResult = new DotnetNewCommand(_log, "console", "--no-restore", "--force") 130new DotnetNewCommand(_log, "webapp", "-o", "webapp") 139new DotnetNewCommand(_log, "razor", "-o", "razor") 158new DotnetNewCommand(_log, "TestAssets.TemplateWithBinaryFile") 185new DotnetNewCommand(_log, "TestAssets.TemplateWithBinaryFile") 212new DotnetNewCommand(_log, "TestAssets.TemplateWithParamsSharingPrefix") 263new DotnetNewCommand(_log, "TestAssets.TemplateWithConditions", "--A", "true") 277new DotnetNewCommand(_log, "TestAssets.TemplateWithConditions", "--A", "false") 291new DotnetNewCommand(_log, "TestAssets.TemplateWithConditions", "--B", "true") 315new DotnetNewCommand(_log, "TestAssets.TemplateWithPreferDefaultName", "-n", name) 345new DotnetNewCommand(_log, templateName, "--dry-run") 358Utils.CommandResult cmd = new DotnetNewCommand(Log) 374Utils.CommandResult cmd = new DotnetNewCommand(Log) 383Utils.CommandResult cmd = new DotnetNewCommand(Log) 394Utils.CommandResult cmd = new DotnetNewCommand(Log) 410CommandResult cmd = new DotnetNewCommand(Log, "console", languageOption, language, invalidOption) 422Utils.CommandResult cmd = new DotnetNewCommand(Log) 433Utils.CommandResult cmd = new DotnetNewCommand(Log) 450new DotnetNewCommand(Log) 457CommandResult result = new DotnetNewCommand(Log) 474new DotnetNewCommand(Log) 490new DotnetNewCommand(Log) 505new DotnetNewCommand(Log) 520new DotnetNewCommand(Log)
DotnetNewListTests.Approval.cs (5)
15CommandResult commandResult = new DotnetNewCommand(_log, commandName) 34CommandResult commandResult = new DotnetNewCommand(_log, "list") 100CommandResult commandResult = new DotnetNewCommand(_log, "list", "RestrictedTemplate") 118CommandResult commandResult = new DotnetNewCommand(_log, "list", "RestrictedTemplate", "--ignore-constraints") 135CommandResult commandResult = new DotnetNewCommand(_log, "list")
DotnetNewListTests.cs (44)
27new DotnetNewCommand(_log, command.Split(" ")) 46new DotnetNewCommand(_log, command.Split(" ")) 63new DotnetNewCommand(_log, command.Split(" ")) 83new DotnetNewCommand(_log, command.Split(" ")) 102new DotnetNewCommand(_log, "--install", "Microsoft.DotNet.Web.ProjectTemplates.5.0") 112new DotnetNewCommand(_log, "--list") 123new DotnetNewCommand(_log, "webapp", "--list") 134new DotnetNewCommand(_log, "razor", "--list") 151new DotnetNewCommand(_log, "--list") 163new DotnetNewCommand(_log, "c", "--list") 175new DotnetNewCommand(_log, "c", "--list", "--framework") 187new DotnetNewCommand(_log, "c", "--list", "-f") 200new DotnetNewCommand(_log, "--list", "--framework") 212new DotnetNewCommand(_log, "--list", "-f") 231new DotnetNewCommand(_log, "--list") 243new DotnetNewCommand(_log, "c", "--list") 255new DotnetNewCommand(_log, "c", "--list", "--langVersion") 267new DotnetNewCommand(_log, "--list", "--langVersion") 285new DotnetNewCommand(_log, "--list") 297new DotnetNewCommand(_log, "c", "--list") 309new DotnetNewCommand(_log, "c", "--list", "--no-restore", "invalid") 321new DotnetNewCommand(_log, "--list", "--no-restore", "invalid") 339new DotnetNewCommand(_log, "--list") 351new DotnetNewCommand(_log, "c", "--list") 363new DotnetNewCommand(_log, "c", "--list", "--framework", "net5.0") 375new DotnetNewCommand(_log, "c", "--list", "-f", "net5.0") 387new DotnetNewCommand(_log, "--list", "--framework", "net5.0") 399new DotnetNewCommand(_log, "--list", "-f", "net5.0") 417new DotnetNewCommand(_log, "--list") 429new DotnetNewCommand(_log, "--list", "--unknown") 437new DotnetNewCommand(_log, "c", "--list", "--unknown") 445new DotnetNewCommand(_log, "c", "--list", "--unknown", "--language", "C#") 459new DotnetNewCommand(_log, "--list") 471new DotnetNewCommand(_log, "--list", "--framework", "unknown") 479new DotnetNewCommand(_log, "c", "--list", "--framework", "unknown") 493new DotnetNewCommand(_log, "--list") 505new DotnetNewCommand(_log, "--list", "--language", "unknown", "--framework", "unknown") 513new DotnetNewCommand(_log, "c", "--list", "--language", "unknown", "--framework", "unknown") 529new DotnetNewCommand(_log, "--list", "--columns-all") 549new DotnetNewCommand(_log, "--install", "Microsoft.DotNet.Web.ProjectTemplates.5.0") 556new DotnetNewCommand(_log, "list", "--columns", columnName) 573CommandResult commandResult1 = new DotnetNewCommand(_log, command1.Split()) 577CommandResult commandResult2 = new DotnetNewCommand(_log, command2.Split()) 598CommandResult commandResult = new DotnetNewCommand(_log, command.Split())
DotnetNewLocaleTests.cs (8)
30CommandResult commandResult = new DotnetNewCommand(_log, "-i", testTemplatesFolder) 54CommandResult commandResult = new DotnetNewCommand(_log, "-i", testTemplatesFolder) 74new DotnetNewCommand(_log, "-i", testTemplateLocation) 117CommandResult commandResult = new DotnetNewCommand(_log, "-i", testTemplateLocation) 145new DotnetNewCommand(_log, "-i", tmpTemplateLocation) 165new DotnetNewCommand(_log, "TestAssets.TemplateWithLocalization") 198CommandResult result = new DotnetNewCommand(_log, "-i", tmpTemplateLocation) 225result = new DotnetNewCommand(_log, "TestAssets.TemplateWithLocalization")
DotnetNewSearchTests.Approval.cs (2)
15CommandResult commandResult = new DotnetNewCommand(_log, testCase) 32CommandResult commandResult = new DotnetNewCommand(_log, "search", "do-not-exist")
DotnetNewSearchTests.cs (33)
25CommandResult commandResult = new DotnetNewCommand(_log, testCase.Split(" ")) 53new DotnetNewCommand(_log, testCase.Split(" ")) 68new DotnetNewCommand(_log, testCase.Split(" ")) 81CommandResult commandResult = new DotnetNewCommand(_log, testCase.Split(" ")) 110CommandResult commandResult = new DotnetNewCommand(_log, testCase.Split(" ")) 137CommandResult commandResult = new DotnetNewCommand(_log, testCase.Split(" ")) 168CommandResult commandResult = new DotnetNewCommand(_log, testCase.Split(" ")) 197CommandResult commandResult = new DotnetNewCommand(_log, testCase.Split(" ")) 228CommandResult commandResult = new DotnetNewCommand(_log, testCase.Split(" ")) 260CommandResult commandResult = new DotnetNewCommand(_log, testCase.Split(" ")) 293CommandResult commandResult = new DotnetNewCommand(_log, testCase.Split(" ")) 323CommandResult commandResult = new DotnetNewCommand(_log, testCase.Split(" ")) 354CommandResult commandResult = new DotnetNewCommand(_log, testCase.Split(" ")) 385CommandResult commandResult = new DotnetNewCommand(_log, testCase.Split(" ")) 416CommandResult commandResult = new DotnetNewCommand(_log, testCase.Split(" ")) 447CommandResult commandResult = new DotnetNewCommand(_log, testCase.Split(" ")) 487CommandResult commandResult = new DotnetNewCommand(_log, "con", "--search", "--framework") 508commandResult = new DotnetNewCommand(_log, "con", "--search", "-f") 528commandResult = new DotnetNewCommand(_log, "--search", "-f") 553CommandResult commandResult = new DotnetNewCommand(_log, "con", "--search", "--langVersion") 574commandResult = new DotnetNewCommand(_log, "--search", "--langVersion") 600CommandResult commandResult = new DotnetNewCommand(_log, "con", "--search", "--langVersion", "smth") 621commandResult = new DotnetNewCommand(_log, "--search", "--langVersion", "smth") 647CommandResult commandResult = new DotnetNewCommand(_log, "con", "--search", "-f", "netcoreapp3.1") 668commandResult = new DotnetNewCommand(_log, "--search", "-f", "net5.0") 694new DotnetNewCommand(_log, "--search", "--unknown") 700new DotnetNewCommand(_log, "con", "--search", "--unknown") 706new DotnetNewCommand(_log, "con", "--search", "--unknown", "--language", "C#") 719CommandResult commandResult1 = new DotnetNewCommand(_log, command1.Split()) 723CommandResult commandResult2 = new DotnetNewCommand(_log, command2.Split()) 742CommandResult commandResult = new DotnetNewCommand(_log, command.Split()) 768CommandResult commandResult = new DotnetNewCommand(_log, "--search", "console") 782CommandResult commandResult = new DotnetNewCommand(_log, "search", "console")
DotnetNewTests.cs (8)
22CommandResult commandResult = new DotnetNewCommand(_log) 39CommandResult commandResult = new DotnetNewCommand(_log, "search", "template-does-not-exist", optionName, optionValue) 52CommandResult commandResult = new DotnetNewCommand(_log, "search", "template-does-not-exist") 71CommandResult commandResult = new DotnetNewCommand(_log, "search", "template-does-not-exist", optionName, optionValue) 91CommandResult commandResult = new DotnetNewCommand(_log, "search", "template-does-not-exist", optionName, optionValue) 112CommandResult commandResult = new DotnetNewCommand( 131CommandResult commandResult = new DotnetNewCommand(_log, "console", "--dry-run") 151CommandResult commandResult = new DotnetNewCommand(_log, "console", "--dry-run")
DotnetNewTestTemplatesTests.cs (6)
68new DotnetNewCommand(dummyLog, "uninstall", templatePackagePath) 73new DotnetNewCommand(dummyLog, "install", templatePackagePath) 91new DotnetNewCommand(_log, args) 101new DotnetNewCommand(_log, $"{itemTemplate} -n {itemName} -lang {language} -o {outputDirectory}") 145new DotnetNewCommand(_log, args) 191new DotnetNewCommand(_log, args)
DotnetNewUninstallTests.Approval.cs (2)
16CommandResult commandResult = new DotnetNewCommand(_log, "uninstall") 38CommandResult commandResult = new DotnetNewCommand(_log, "uninstall", "TemplateWithRequiredParameters")
DotnetNewUninstallTests.cs (35)
29new DotnetNewCommand(_log, commandName) 48new DotnetNewCommand(_log, "-i", "Microsoft.DotNet.Web.ProjectTemplates.5.0::5.0.0") 60new DotnetNewCommand(_log, commandName) 81new DotnetNewCommand(_log, commandName) 102new DotnetNewCommand(_log, commandName) 113new DotnetNewCommand(_log, commandName, templateLocation) 123new DotnetNewCommand(_log, commandName) 143new DotnetNewCommand(_log, "-i", "Microsoft.DotNet.Web.ProjectTemplates.5.0::5.0.0") 155new DotnetNewCommand(_log, commandName) 176new DotnetNewCommand(_log, commandName, packageNameToUnisntall) 186new DotnetNewCommand(_log, commandName) 207new DotnetNewCommand(_log, "-i", "Microsoft.DotNet.Web.ProjectTemplates.5.0", "-i", "Microsoft.DotNet.Common.ProjectTemplates.5.0") 220new DotnetNewCommand(_log, "-u", "Microsoft.DotNet.Common.ProjectTemplates.5.0", "-u", basicFSharp) 231new DotnetNewCommand(_log, "-u") 253new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Web.ProjectTemplates.5.0", "Microsoft.DotNet.Common.ProjectTemplates.5.0") 266new DotnetNewCommand(_log, "uninstall", "Microsoft.DotNet.Common.ProjectTemplates.5.0", basicFSharp) 277new DotnetNewCommand(_log, "uninstall") 297new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Web.ProjectTemplates.5.0::5.0.0") 309new DotnetNewCommand(_log, commandName, "Microsoft.DotNet.Common.ProjectTemplates.5.0") 325new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0") 334new DotnetNewCommand(_log, commandName, "console") 353new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0") 362new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.3.1::5.0.0") 371new DotnetNewCommand(_log, commandName, "console") 394new DotnetNewCommand(_log, "install", pattern) 409new DotnetNewCommand(_log, commandName) 419new DotnetNewCommand(_log, commandName, pattern) 428new DotnetNewCommand(_log, commandName) 443new DotnetNewCommand(_log, "-i", pattern) 455new DotnetNewCommand(_log, "-u") 463new DotnetNewCommand(_log, "-u", pattern) 470new DotnetNewCommand(_log, "-u") 495new DotnetNewCommand(_log, "-u") 520CommandResult commandResult = new DotnetNewCommand(_log, commandName) 535CommandResult commandResult = new DotnetNewCommand(_log, "uninstall")
DotnetNewUpdateTests.Approval.cs (3)
16CommandResult commandResult = new DotnetNewCommand(_log, "update") 32new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0") 43CommandResult commandResult = new DotnetNewCommand(_log, "update")
DotnetNewUpdateTests.cs (21)
22new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0") 34new DotnetNewCommand(_log, testCase.Split(" ")) 66new DotnetNewCommand(_log, "--update-check") 87new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0") 99new DotnetNewCommand(_log, testCase.Split(" ")) 114new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0") 126new DotnetNewCommand(_log, "console") 144new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0") 156new DotnetNewCommand(_log, "console", "--no-update-check", "-o", "no-update-check") 169new DotnetNewCommand(_log, "console", "-o", "update-check") 187new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0") 199new DotnetNewCommand(_log, "console") 222Utils.CommandResult commandResult = new DotnetNewCommand(_log, "--update-check") 237Utils.CommandResult commandResult = new DotnetNewCommand(_log, "update", "--check-only") 254new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0::5.0.0") 266new DotnetNewCommand(_log, "update", "--check-only") 281new DotnetNewCommand(_log, testCase) 305new DotnetNewCommand(_log, "install", "Microsoft.DotNet.Common.ProjectTemplates.5.0") 317new DotnetNewCommand(_log, commandName) 337Utils.CommandResult commandResult = new DotnetNewCommand(_log, "--update-apply") 352Utils.CommandResult commandResult = new DotnetNewCommand(_log, "update")
FileRenameTests.cs (1)
21new DotnetNewCommand(_log, "TestAssets.TemplateWithFileRenameDate", "--migrationName", "MyTestName")
FirstRunTest.cs (2)
19new DotnetNewCommand(_log) 27new DotnetNewCommand(_log, "--list")
MSBuildEvaluationTests.cs (18)
22CommandResult cmd = new DotnetNewCommand(Log) 27cmd = new DotnetNewCommand(Log) 35cmd = new DotnetNewCommand(Log) 60CommandResult cmd = new DotnetNewCommand(Log) 65cmd = new DotnetNewCommand(Log) 73cmd = new DotnetNewCommand(Log) 99CommandResult cmd = new DotnetNewCommand(Log) 105cmd = new DotnetNewCommand(Log) 110cmd = new DotnetNewCommand(Log) 116cmd = new DotnetNewCommand(Log) 124cmd = new DotnetNewCommand(Log) 139CommandResult cmd = new DotnetNewCommand(Log) 144cmd = new DotnetNewCommand(Log) 150cmd = new DotnetNewCommand(Log) 158cmd = new DotnetNewCommand(Log) 167cmd = new DotnetNewCommand(Log) 191CommandResult cmd = new DotnetNewCommand(Log) 198cmd = new DotnetNewCommand(Log)
PostActionTests.Approval.cs (10)
18CommandResult commandResult = new DotnetNewCommand(_log, "TestAssets.PostActions.RestoreNuGet.Basic", "-n", "MyProject") 50CommandResult commandResult = new DotnetNewCommand(_log, templateName, "--allow-scripts", "yes") 73CommandResult commandResult = new DotnetNewCommand(_log, templateName, "-n", "MyProject") 104CommandResult commandResult = new DotnetNewCommand(_log, templateName, "-n", "MyProject") 136new DotnetNewCommand(_log, "sln", "-n", "MySolution") 144CommandResult commandResult = new DotnetNewCommand(_log, templateName, "-n", "MyProject") 175CommandResult commandResult = new DotnetNewCommand(_log, templateName) 197CommandResult commandResult = new DotnetNewCommand(_log, templateName, "-n", "MyProject", "--dry-run") 221CommandResult commandResult = new DotnetNewCommand(_log, templateName) 241CommandResult commandResult = new DotnetNewCommand(_log, templateName, "--allow-scripts", "no")
PostActionTests.cs (48)
35new DotnetNewCommand(_log, templateName, "-n", "MyProject") 70new DotnetNewCommand(_log, expectedTemplateName, "-n", "MyProject", "-o", outputDirectory) 106new DotnetNewCommand(_log, expectedTemplateName, "-n", "MyProject", "-o", outputDirectory) 142new DotnetNewCommand(_log, templateName, "-n", "MyProject", "--firstRename", "Awesome") 177new DotnetNewCommand(_log, templateName, "-n", "TemplateApplication") 219new DotnetNewCommand(_log, templateName, "-n", "TemplateApplication") 272var result = new DotnetNewCommand(_log, templateName, "-n", rename) 318CommandResult commandResult = new DotnetNewCommand(_log, templateName, "--allow-scripts", "yes") 351CommandResult commandResult = new DotnetNewCommand(_log, templateName, "--allow-scripts", "yes") 376CommandResult commandResult = new DotnetNewCommand(_log, templateName, "--allow-scripts", "yes") 401CommandResult commandResult = new DotnetNewCommand(_log, templateName, "--allow-scripts", "yes") 435new DotnetNewCommand(_log, templateName) 466new DotnetNewCommand(_log, expectedTemplateName, "-o", outputDirectory, "-n", "MyProject") 497new DotnetNewCommand(_log, expectedTemplateName, "-o", "output", "-n", "MyProject") 528new DotnetNewCommand(_log, expectedTemplateName) 568new DotnetNewCommand(_log) 573new DotnetNewCommand(_log, expectedTemplateName) 615new DotnetNewCommand(_log) 620new DotnetNewCommand(_log, expectedTemplateName, "--existingProject", "src/AlreadyExisting/AlreadyExisting.csproj") 657new DotnetNewCommand(_log, expectedTemplateName, "-o", outputDirectory) 687new DotnetNewCommand(_log, expectedTemplateName, "-o", "output") 718CommandResult commandResult = new DotnetNewCommand(_log, templateName) 758new DotnetNewCommand(_log, "sln", "-n", "MySolution") 766new DotnetNewCommand(_log, templateName, "-n", "MyProject") 792new DotnetNewCommand(_log, "sln", "-n", "MySolution", "-o", outputDirectory) 800new DotnetNewCommand(_log, expectedTemplateName, "-n", "MyProject", "-o", outputDirectory) 828new DotnetNewCommand(_log, "sln", "-n", "MySolution", "-o", outputDirectory) 836new DotnetNewCommand(_log, expectedTemplateName, "-n", "MyProject", "-o", outputDirectory) 864new DotnetNewCommand(_log, "sln", "-n", "MySolution", "-o", outputDirectory) 872new DotnetNewCommand(_log, expectedTemplateName, "-n", "MyProject", "-o", outputDirectory) 899new DotnetNewCommand(_log, "sln", "-n", "MySolution") 907new DotnetNewCommand(_log, expectedTemplateName) 937CommandResult commandResult = new DotnetNewCommand(_log, templateName) 958CommandResult cmd = new DotnetNewCommand(Log) 963cmd = new DotnetNewCommand(Log) 979CommandResult cmd = new DotnetNewCommand(Log) 984cmd = new DotnetNewCommand(Log) 998CommandResult cmd = new DotnetNewCommand(Log) 1003cmd = new DotnetNewCommand(Log) 1016CommandResult cmd = new DotnetNewCommand(Log) 1036new DotnetNewCommand(_log, templateName) 1065new DotnetNewCommand(_log, "sln", "-n", "MySolution") 1076new DotnetNewCommand(_log, existingProjectTemplateName, "-o", "ExistingProject") 1089new DotnetNewCommand(_log, myProjectTemplateName, "-o", "custommodule1", "-n", "custommodule1") 1114new DotnetNewCommand(_log, templateName, "-n", "TheProjectName") 1145new DotnetNewCommand(_log, templateName, "-n", "TheProjectName") 1180new DotnetNewCommand(_log, templateName) 1207new DotnetNewCommand(_log, templateName, "-o", "SolutionFolder/SomeTestFolder")
SharedHomeDirectory.cs (6)
49new DotnetNewCommand(Log, args.ToArray()) 61new DotnetNewCommand(Log) 70new DotnetNewCommand(Log, "install", TemplatePackagesPaths.MicrosoftDotNetCommonProjectTemplates60Path) 79new DotnetNewCommand(Log, "install", TemplatePackagesPaths.MicrosoftDotNetCommonProjectTemplates70Path) 87new DotnetNewCommand(Log, "install", TemplatePackagesPaths.MicrosoftDotNetCommonProjectTemplates80Path) 95new DotnetNewCommand(Log, "install", TemplatePackagesPaths.MicrosoftDotNetCommonProjectTemplates90Path)
SourcesTests.cs (2)
21new DotnetNewCommand(_log, "withexclude") 32new DotnetNewCommand(_log, "withoutexclude")
TemplateDiscoveryTests.cs (7)
47new DotnetNewCommand(_log) 56new DotnetNewCommand(_log, "search", "func") 147new DotnetNewCommand(_log) 156new DotnetNewCommand(_log, "search", "CliHostFile") 168new DotnetNewCommand(_log, "search", "--param") 180new DotnetNewCommand(_log, "search", "-p") 192new DotnetNewCommand(_log, "search", "--test-param")
TemplateDiscoveryTool.cs (1)
21new DotnetNewCommand(
WebProjectsTests.cs (4)
45new DotnetNewCommand(_log, args) 76CommandResult commandResult = new DotnetNewCommand(_log, "webapi", "-h") 93CommandResult commandResult = new DotnetNewCommand(_log, "mvc", "-h") 113CommandResult commandResult = new DotnetNewCommand(_log, templateName, "-h")
EndToEnd.Tests (11)
GivenDotNetUsesMSBuild.cs (1)
18new DotnetNewCommand(Log)
GivenSelfContainedAppsRollForward.cs (2)
19new DotnetNewCommand(Log, "web", "--no-restore") 46new DotnetNewCommand(Log, "web", "--no-restore")
ProjectBuildTests.cs (8)
18new DotnetNewCommand(Log, "console", "--no-restore") 60new DotnetNewCommand(Log, "console", "--no-restore") 97new DotnetNewCommand(Log) 136new DotnetNewCommand(Log) 209new DotnetNewCommand(Log) 230new DotnetNewCommand(Log) 278new DotnetNewCommand(Log) 505new DotnetNewCommand(Log)
Microsoft.NET.Build.Tests (8)
EvaluatorFastPathTests.cs (1)
39new DotnetNewCommand(Log, alias)
GivenThatWeWantToBuildALibrary.cs (1)
673new DotnetNewCommand(Log)
GivenThatWeWantToBuildAWindowsDesktopProject.cs (2)
149new DotnetNewCommand(Log, "wpf", "--no-restore") 255new DotnetNewCommand(Log)
GivenThatWeWantToUseVB.cs (1)
180new DotnetNewCommand(Log, "wpf", "-lang", "vb")
GlobalPropertyFlowTests.cs (1)
184new DotnetNewCommand(Log, "sln")
ReferenceExeTests.cs (2)
349new DotnetNewCommand(Log, testTemplateName) 493new DotnetNewCommand(Log, testTemplateName)
Microsoft.NET.Publish.Tests (4)
GivenThatWeWantToPublishIncrementally.cs (1)
184new DotnetNewCommand(Log)
GivenThatWeWantToPublishTrimmedWindowsFormsAndWPFApps.cs (2)
119new DotnetNewCommand(Log) 191new DotnetNewCommand(Log)
PublishWpfApp.cs (1)
19new DotnetNewCommand(Log)
Microsoft.NET.TestFramework (1)
TestAssetsManager.cs (1)
102var slnCreationResult = new DotnetNewCommand(Log, "sln", "--format", "sln")
7 references to DotnetNewCommand
dotnet-new.IntegrationTests (2)
BaseIntegrationTest.cs (2)
92DotnetNewCommand command = new DotnetNewCommand(log, "-i", packageName) 122DotnetNewCommand command = new DotnetNewCommand(log, "install", testTemplate)
Microsoft.NET.TestFramework (5)
Commands\DotnetNewCommand.cs (5)
19public DotnetNewCommand WithVirtualHive() 27public DotnetNewCommand WithCustomHive(string path) 35public DotnetNewCommand WithoutCustomHive() 41public DotnetNewCommand WithoutBuiltInTemplates() 47public DotnetNewCommand WithDebug()