CommandTests\NuGet\GivenANuGetCommand.cs (5)
106new DotnetCommand(Log, "nuget")
130new DotnetCommand(Log)
151new DotnetCommand(Log, "package", "add", "dotnet-hello@1.0.0")
159var commandResult = new DotnetCommand(Log, "package", "update", "dotnet-hello")
167var listPackageCommandResult = new DotnetCommand(Log, "package", "list", "--format", "json")
CommandTests\Package\Add\GivenDotnetPackageAdd.cs (24)
26var cmd = new DotnetCommand(Log)
65var cmd = new DotnetCommand(Log)
95var cmd = new DotnetCommand(Log)
120var cmd = new DotnetCommand(Log)
140var cmd = new DotnetCommand(Log)
164var cmd = new DotnetCommand(Log)
188var cmd = new DotnetCommand(Log)
210var cmd = new DotnetCommand(Log)
231var cmd = new DotnetCommand(Log)
248var cmd = new DotnetCommand(Log)
263var cmd = new DotnetCommand(Log)
284var cmd = new DotnetCommand(Log)
302new DotnetCommand(Log, "package", "add", "Humanizer@2.14.1", "--file", "Program.cs")
327new DotnetCommand(Log, "package", "add", "Humanizer@2.14.1", "--file", "Program.cs")
354var cmd = new DotnetCommand(Log, "package", "add", "A", "--file", "Program.cs")
391var cmd = new DotnetCommand(Log, "package", "add", "A", "--prerelease", "--file", "Program.cs")
412new DotnetCommand(Log, "package", "add", "Humanizer", "--file", "Program.cs", "--no-restore")
434new DotnetCommand(Log, "package", "add", "Humanizer@2.14.1", "--file", "Program.cs", "--prerelease")
453new DotnetCommand(Log, "package", "add", "Microsoft.ThisPackageDoesNotExist", "--file", "Program.cs")
470new DotnetCommand(Log, "package", "add", "Microsoft.ThisPackageDoesNotExist", "--file", "Program.cs", "--no-restore")
501new DotnetCommand(Log, "package", "add", "Humanizer@2.14.1", "--file", "Program.cs")
556new DotnetCommand(Log, "package", "add", "Humanizer@2.14.1", "--file", "Program.cs")
605new DotnetCommand(Log, "package", "add", "A", "--file", "Program.cs")
651new DotnetCommand(Log, "package", "add", "Humanizer", "--file", "Program.cs")
CommandTests\Package\Remove\GivenDotnetRemovePackage.cs (7)
50var cmd = new DotnetCommand(Log).Execute($"remove", "package", helpArg);
60var cmd = new DotnetCommand(Log)
74var add = new DotnetCommand(Log)
80var remove = new DotnetCommand(Log)
100new DotnetCommand(Log, "package", "remove", "Humanizer", "--file", "Program.cs")
125new DotnetCommand(Log, "package", "remove", "Humanizer", "--file", "Program.cs")
148new DotnetCommand(Log, "package", "remove", "Humanizer", "--file", "Program.cs")
CommandTests\Project\Convert\DotnetProjectConvertTests.cs (29)
29new DotnetCommand(Log, "project", "convert", "Program.cs")
49new DotnetCommand(Log, "new", "console")
75new DotnetCommand(Log, "project", "convert", "MyApp.cs")
93new DotnetCommand(Log, "project", "convert", "MyApp.cs", "-o", "MyApp1")
118new DotnetCommand(Log, "project", "convert", "MyApp.cs", "-o", "SomeOutput")
136new DotnetCommand(Log, "project", "convert", "Program1.cs")
155new DotnetCommand(Log, "project", "convert")
170new DotnetCommand(Log, "project", "convert", "NotHere.cs")
187new DotnetCommand(Log, "project", "convert", "Program.vb")
204new DotnetCommand(Log, "project", "convert", "Program.CS")
226new DotnetCommand(Log, "project", "convert", "Program.cs")
254new DotnetCommand(Log, "project", "convert", "app/Program.cs")
284new DotnetCommand(Log, "project", "convert", "Program.cs")
314new DotnetCommand(Log, "project", "convert", "Program.cs")
340new DotnetCommand(Log, "project", "convert", "Program.cs")
377new DotnetCommand(Log, "project", "convert", "Program.cs")
412new DotnetCommand(Log, "run", "Program.cs")
419new DotnetCommand(Log, "project", "convert", "Program.cs")
434new DotnetCommand(Log, "run", "Program/Program.cs")
463new DotnetCommand(Log, "run", "Program.cs")
470new DotnetCommand(Log, "project", "convert", "Program.cs")
484new DotnetCommand(Log, "run", "Program/Program.cs")
513new DotnetCommand(Log, "run", "Program.cs")
520new DotnetCommand(Log, "project", "convert", "Program.cs")
534new DotnetCommand(Log, "run", "Program/Program.cs")
559new DotnetCommand(Log, "project", "convert", "Program.cs")
586new DotnetCommand(Log, "project", "convert", "Program.cs")
607new DotnetCommand(Log, "project", "convert", "Program.cs")
631new DotnetCommand(Log, "project", "convert", "Program.cs")
CommandTests\Reference\Add\GivenDotnetAddReference.cs (43)
72new DotnetNewCommand(Log, "classlib", "-o", projDir.Path, "--no-restore")
105var cmd = new DotnetCommand(Log, "reference", "add").Execute(helpArg);
117var cmd = new DotnetCommand(Log, "add", "one", "two", "three", "reference")
131var cmd = new DotnetCommand(Log, "add", projName, "reference")
159var cmd = new DotnetCommand(Log, "add", projName, "reference")
173var cmd = new DotnetCommand(Log, "add", "reference")
186var cmd = new DotnetCommand(Log, "add", "reference")
207var cmd = new DotnetCommand(Log, "add", "reference", invalidProjPath)
224var cmd = new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
242var cmd = new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
259new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
265var cmd = new DotnetCommand(Log, "add", lib.CsProjName, "reference")
281new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
287var cmd = new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
303new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
309var cmd = new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
325new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
331var cmd = new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
347new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
353var cmd = new DotnetCommand(Log, "add", lib.CsProjName, "reference")
371var cmd = new DotnetCommand(Log, "add", proj.CsProjPath, "reference")
385new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
391var cmd = new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
406var cmd = new DotnetCommand(Log, "add", proj.CsProjName, "reference")
421var cmd = new DotnetCommand(Log, "add", proj.CsProjName, "reference")
436var cmd = new DotnetCommand(Log, "add", proj.CsProjPath, "reference")
453var cmd = new DotnetCommand(Log, "add", proj.CsProjName, "reference")
468var cmd = new DotnetCommand(Log, "add", proj.CsProjPath, "reference")
485var cmd = new DotnetCommand(Log, "add", proj.CsProjPath, "reference")
505var cmd = new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
526var cmd = new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
544var cmd = new DotnetCommand(Log, "add", "reference")
561var cmd = new DotnetCommand(Log, "add", lib.CsProjName, "reference")
576var cmd = new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
591var cmd = new DotnetCommand(Log, "add", lib.CsProjName, "reference")
609var cmd = new DotnetCommand(Log, "add", setup.LibCsprojPath, "reference")
628var cmd = new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
645var cmd = new DotnetCommand(Log, "add", net452netcoreapp10lib.CsProjPath, "reference")
667var cmd = new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
693var cmd = new DotnetCommand(Log, "add", net45lib.CsProjPath, "reference")
707var result = new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
723var result = new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
739var result = new DotnetCommand(Log, "add", lib.CsProjPath, "reference")
CommandTests\Run\GivenDotnetRunBuildsCsProj.cs (58)
31new DotnetCommand(Log, "run")
47new DotnetCommand(Log, "run")
64new DotnetCommand(Log, "run")
78var result = new DotnetCommand(Log, "run")
98new DotnetCommand(Log, "run")
114new DotnetCommand(Log, "run")
130new DotnetCommand(Log, "run")
147new DotnetCommand(Log, "run")
163new DotnetCommand(Log, "run")
180new DotnetCommand(Log, "run")
197new DotnetCommand(Log, "run")
210new DotnetCommand(Log, "run")
227new DotnetNewCommand(Log)
234new DotnetRestoreCommand(Log)
240new DotnetCommand(Log, "run")
256new DotnetCommand(Log, "run")
272new DotnetCommand(Log, "run")
289new DotnetCommand(Log, "run")
306new DotnetCommand(Log, "run")
323new DotnetCommand(Log, "run")
340new DotnetCommand(Log, "run")
357new DotnetCommand(Log, "run")
374var runResult = new DotnetCommand(Log, "run")
396var cmd = new DotnetCommand(Log, "run")
416var cmd = new DotnetCommand(Log, "run", "--verbosity", "quiet")
437var cmd = new DotnetCommand(Log, "run")
457var cmd = new DotnetCommand(Log, "run")
477var cmd = new DotnetCommand(Log, "run")
497var cmd = new DotnetCommand(Log, "run")
516var cmd = new DotnetCommand(Log, "run")
536var cmd = new DotnetCommand(Log, "run")
555var cmd = new DotnetCommand(Log, "run")
574new DotnetCommand(Log, "run")
591new DotnetCommand(Log, "run")
608var cmd = new DotnetCommand(Log, "run")
627var cmd = new DotnetCommand(Log, "run")
646var cmd = new DotnetCommand(Log, "run")
664var cmd = new DotnetCommand(Log, "run")
680var result = new DotnetCommand(Log, "run")
702var result = new DotnetCommand(Log, "run", "--interactive", "false")
723var result = new DotnetCommand(Log, "run")
739var result = new DotnetCommand(Log, "run", "/v", "d")
755var result = new DotnetCommand(Log, "run")
768var command = new DotnetCommand(Log, "run")
784var result = new DotnetCommand(Log, "run")
799new DotnetCommand(Log, "run")
816new DotnetCommand(Log, "run")
833new DotnetCommand(Log, "run")
850new DotnetCommand(Log, "run")
868new DotnetCommand(Log, "run", "-lp", "Profile2")
887new DotnetCommand(Log, "run")
906new DotnetCommand(Log, "run", "--no-launch-profile-arguments")
926new DotnetCommand(Log, "run", "-- test")
943new DotnetCommand(Log, "run")
960new DotnetCommand(Log, "run", optionName, "MyCoolEnvironmentVariableKey=OverriddenEnvironmentVariableValue")
980new DotnetCommand(Log, "run", "-e", $"{dotnetLaunchProfile}=1", "-e", "ASPNETCORE_URLS=2")
997new DotnetCommand(Log, "run", "-e", "Configuration=XYZ")
1012var result = new DotnetCommand(Log, "run")
CommandTests\Run\RunFileTests.cs (168)
159var result = new DotnetCommand(Log, "run", path)
187new DotnetCommand(Log, "Program.cs")
205new DotnetCommand(Log, "Program.cs")
211new DotnetCommand(Log, "./Program.cs")
217new DotnetCommand(Log, $".{Path.DirectorySeparatorChar}Program.cs")
223new DotnetCommand(Log, Path.Join(testInstance.Path, "Program.cs"))
229new DotnetCommand(Log, "Program.cs", "-c", "Debug")
237new DotnetCommand(Log, "Program.cs", "arg1", "arg2")
247new DotnetCommand(Log, "Program.cs", "build")
257new DotnetCommand(Log, "Program.cs", "arg1", "arg2")
277var result = new DotnetCommand(Log, "run", "program.cs")
307new DotnetCommand(Log, "run", $"{dirName}/Program.cs")
323new DotnetCommand(Log, "run", "--project", "Program.cs")
351new DotnetCommand(Log, cmd)
358new DotnetCommand(Log, $"./{cmd}")
365new DotnetCommand(Log, "run", cmd)
387new DotnetCommand(Log, arg)
395new DotnetCommand(Log, "run", arg)
413new DotnetCommand(Log, "new", "tool-manifest")
418new DotnetCommand(Log, "tool", "install", "complog@0.7.0")
424new DotnetCommand(Log, "complog")
431new DotnetCommand(Log, "./complog")
438new DotnetCommand(Log, "run", "complog")
451new DotnetCommand(Log, "run", "-")
467new DotnetCommand(Log, "run", "-", "--no-build")
476new DotnetCommand(Log, "run", "-", "--launch-profile=test")
490new DotnetCommand(Log, "run", "--", "-")
513new DotnetCommand(Log, "run", path)
532new DotnetCommand(Log, "run", "./App.csproj")
553new DotnetCommand(Log, "run", "./App.csproj")
572new DotnetCommand(Log, "../file/Program.cs")
590new DotnetCommand(Log, "run", "--file", "../file/Program.cs")
615new DotnetCommand(Log, "run", fileName)
635new DotnetCommand(Log, "run", fileName)
652new DotnetCommand(Log, "run", "Program.cs")
658new DotnetCommand(Log, "run", "Program2.cs")
673new DotnetCommand(Log, "run", "Program.cs")
692new DotnetCommand(Log, "run", "Util.cs")
708new DotnetCommand(Log, "run", "NonExistentFile.cs")
728new DotnetCommand(Log, "run", "Program.cs")
740new DotnetCommand(Log, "run", "Program.cs")
759new DotnetCommand(Log, "run", "Util.cs")
786new DotnetCommand(Log, "run", "Program.cs")
808new DotnetCommand(Log, "run", $"{dirName}/App.csproj")
827new DotnetCommand(Log, "run", "Program.cs")
843new DotnetCommand(Log, "run", "Program.cs")
866new DotnetCommand(Log, "run", "Program.cs")
888new DotnetCommand(Log, "run", "Program.cs")
911new DotnetCommand(Log, "run", "Program.cs")
934new DotnetCommand(Log, ["run", "Program.cs", .. input.Split(';')])
953new DotnetCommand(Log, ["run", "--arg", "Program.cs"])
976new DotnetCommand(Log, args)
1000new DotnetCommand(Log, ["run", "--no-cache", .. args])
1022new DotnetCommand(Log, args)
1047new DotnetCommand(Log, "run", "--no-cache", "Program.cs", arg)
1067new DotnetCommand(Log, "run", "--no-cache", "Program.cs", "-bl:one.binlog", "two.binlog", "/bl:three.binlog")
1088new DotnetCommand(Log, "run", "Program.cs", "-bl:test.test")
1109new DotnetCommand(Log, "run", "Program.cs")
1130new DotnetCommand(Log, "run", "--no-cache", "Program.cs", "-bl")
1154var result = new DotnetCommand(Log, "run", "Program.cs", "--no-cache")
1179new DotnetCommand(Log, "run", "Program.cs", "--no-cache")
1196new DotnetCommand(Log, "build", "Program.cs")
1214new DotnetCommand(Log, "run", "Program.cs")
1226new DotnetCommand(Log, "run", "Program.cs")
1245new DotnetCommand(Log, "run", "Program.cs")
1259new DotnetCommand(Log, "run", "Program.cs")
1284new DotnetCommand(Log, "run", "--no-cache", "--file", "Program.cs")
1303new DotnetCommand(Log, "run", "--no-restore", "Program.cs")
1310new DotnetCommand(Log, "restore", "Program.cs")
1316new DotnetCommand(Log, "run", "--no-restore", "Program.cs")
1335new DotnetCommand(Log, "build", "--no-restore", "Program.cs")
1342new DotnetCommand(Log, "restore", "Program.cs")
1348new DotnetCommand(Log, "build", "--no-restore", "Program.cs")
1353new DotnetCommand(Log, "run", "--no-build", "Program.cs")
1378new DotnetCommand(Log, "restore", "Program.cs")
1398new DotnetCommand(Log, "restore", "Program.cs")
1417new DotnetCommand(Log, "run", "--no-build", "Program.cs")
1424new DotnetCommand(Log, "build", "Program.cs")
1431new DotnetCommand(Log, "run", "--no-build", "Program.cs")
1438new DotnetCommand(Log, "run", "Program.cs")
1457new DotnetCommand(Log, "run", "--no-build", "Program.cs")
1464new DotnetCommand(Log, "run", "Program.cs")
1472new DotnetCommand(Log, "run", "--no-build", "Program.cs")
1479new DotnetCommand(Log, "run", "Program.cs")
1499new DotnetCommand(Log, "publish", "Program.cs")
1508new RunExeCommand(Log, Path.Join(publishDir, "Program", $"Program{Constants.ExeSuffix}"))
1530new DotnetCommand(Log, "publish", "Program.cs", "-t", "ComputeContainerConfig", "-p", "PublishAot=false", "--use-current-runtime")
1565new DotnetCommand(Log, "publish", "Program.cs")
1589new DotnetCommand(Log, "publish", "Program.cs", "-c", "Debug", "-p:PublishAot=false", "-bl")
1614new DotnetCommand(Log, "publish", "MyCustomProgram.cs")
1634new DotnetCommand(Log, "publish", "Program.cs", $"/p:PublishDir={customPublishDir}")
1657new DotnetCommand(Log, "publish", "Program.cs")
1682new DotnetCommand(Log, "publish", "./subdir/Program.cs")
1706new DotnetCommand(Log, "run", "MyFileBasedTool.cs")
1719new DotnetCommand(Log, "pack", "MyFileBasedTool.cs")
1729new DotnetCommand(Log, "tool", "exec", "MyFileBasedTool", "--yes", "--add-source", packageDir.FullName)
1751new DotnetCommand(Log, "run", "MyFileBasedTool.cs")
1764new DotnetCommand(Log, "pack", "MyFileBasedTool.cs")
1773new DotnetCommand(Log, "tool", "exec", "MyFileBasedTool", "--yes", "--add-source", outputDir)
1787new DotnetCommand(Log, "run", "Program.cs")
1799new DotnetCommand(Log, "clean", "Program.cs")
1821new DotnetCommand(Log, "build", "Program.cs")
1835new DotnetCommand(Log, "build", "Program.cs")
1864new DotnetCommand(Log, "run", "-bl", "Program.cs")
1875new DotnetCommand(Log, "run", "-bl", "--no-launch-profile", "Program.cs")
1884new DotnetCommand(Log, "run", "-bl", "-lp", "TestProfile2", "Program.cs")
1911new DotnetCommand(Log, "run", "--no-launch-profile", "Program.cs")
1921new DotnetCommand(Log, "run", "-v", "q", "Program.cs")
1931new DotnetCommand(Log, "run", "-v", "q", "-lp", "TestProfile2", "Program.cs")
1959new DotnetCommand(Log, "run", "-v", "q", "First.cs")
1968new DotnetCommand(Log, "run", "-v", "q", "Second.cs")
1988new DotnetCommand(Log, "run", "Program.cs", "-p:DefineConstants=MY_DEFINE")
2005new DotnetCommand(Log, "run", "Program.cs", "-p:DefineConstants=MY_DEFINE")
2024new DotnetCommand(Log, "run", "Program.cs", "--", "--help")
2056new DotnetCommand(Log, "run", "Program.cs", "--", "--help")
2080new DotnetCommand(Log, "build", "Program.cs")
2095new DotnetCommand(Log, "build", "Program.cs")
2137new DotnetCommand(Log, "run", "Program.cs")
2153new DotnetCommand(Log, "run", "Program.cs")
2165new DotnetCommand(Log, "run", "Program.cs")
2175new DotnetCommand(Log, "run", "Program.cs")
2186new DotnetCommand(Log, "run", "Program.cs")
2212new DotnetCommand(Log, "run", fileName, "-bl", "--no-cache")
2398Log.WriteLine($"Skipping code generation because file does not exist: {nonGeneratedFile.FullName}");
2407Log.WriteLine($"{codeFilePath.FullName} needs to be updated:");
2408Log.WriteLine(newText);
2423new DotnetCommand(Log, "run", fileName, "-bl")
2440Log.WriteLine("CSC-only args:");
2441Log.WriteLine(string.Join(Environment.NewLine, normalizedCscOnlyArgs));
2442Log.WriteLine("MSBuild args:");
2443Log.WriteLine(string.Join(Environment.NewLine, msbuildArgsToVerify));
2496new DotnetCommand(Log, "run", fileName, "-bl")
2509new DotnetCommand(Log, "run", fileName, "-bl", "--no-cache")
2536Log.WriteLine($"File differs between MSBuild and CSC-only runs (if this is expected, find the template in '{nameof(CSharpCompilerCommand)}.cs' and update it): {cscOnlyFile}");
2540Log.WriteLine("MSBuild file content:");
2541Log.WriteLine(msbuildFileText);
2542Log.WriteLine("CSC-only file content:");
2543Log.WriteLine(cscOnlyFileText);
2547Log.WriteLine($"MSBuild file size: {msbuildFileText.Length} chars");
2548Log.WriteLine($"CSC-only file size: {cscOnlyFileText.Length} chars");
2668new DotnetCommand(Log, ["run", "Program.cs", "-p:LangVersion=Invalid"])
2688new DotnetCommand(Log, ["run", programFileName, "-bl", .. args])
2718new DotnetCommand(Log, "run", "Program.cs", "--no-cache", "--no-build")
2791new DotnetCommand(Log, "run", "Program.cs", "-bl")
2804new DotnetCommand(Log, "run", "Program.cs", "-bl")
2832var cscResult = new DotnetCommand(Log, "run", "Program.cs", "-bl")
2844var msbuildResult = new DotnetCommand(Log, "run", "Program.cs", "-bl")
2883new DotnetCommand(Log, "run", "Program.cs", "-bl")
2902new DotnetCommand(Log, "run", "Program.cs", "-bl")
2924new DotnetCommand(Log, "run", "Program.cs", "-bl", "--no-restore")
2932new DotnetCommand(Log, "run", "Program.cs", "-bl")
2943new DotnetCommand(Log, "run", "Program.cs", "-bl")
3218new DotnetCommand(Log, "run-api")
3288new DotnetCommand(Log, "run-api")
3355new DotnetCommand(Log, "run-api")
3415new DotnetCommand(Log, "run-api")
3440new DotnetCommand(Log, "run-api")
3474new DotnetCommand(Log, "run", "-bl", "Program.cs")
3490new DotnetCommand(Log, "run", "Program.cs")
3508new DotnetCommand(Log, "run", relativePath)
3527new DotnetCommand(Log, "run", filePath)
3544new DotnetCommand(Log, "run", $"./{fileName}")
3562new DotnetCommand(Log, "run", unicodeFileName)
3576new DotnetCommand(Log, "build", "Program.cs", "-getProperty:TargetFramework")
3620var fileBasedResult = new DotnetCommand(Log, [subcommand, "Program.cs", .. args])
3628var projectBasedResult = new DotnetCommand(Log, [subcommand, .. args])
3648Log.WriteLine($"File '{file}':");
3649Log.WriteLine(text);
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestfromCsproj.cs (30)
24CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
51CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
79new DotnetTestCommand(Log, disableNewOutput: true)
96new DotnetTestCommand(Log, disableNewOutput: true, ConsoleLoggerOutputNormal)
120CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
144var result = new DotnetTestCommand(Log, disableNewOutput: true)
174CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
207CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
239CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
270CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
304Log.WriteLine("pkgDir, package restored path is: " + pkgDir);
307new DotnetRestoreCommand(Log)
313new DotnetBuildCommand(Log)
320CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true, ConsoleLoggerOutputNormal)
348CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
386new DotnetBuildCommand(Log)
393var result = new DotnetTestCommand(Log, disableNewOutput: true, ConsoleLoggerOutputNormal)
420CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
450CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
489CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
525CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
561CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
594CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
624CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
647CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
671CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
699CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
722CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
770CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
794CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestFromCsprojForMultipleTFM.cs (9)
31new DotnetRestoreCommand(Log, "-r", runtime)
36var result = new DotnetTestCommand(Log, disableNewOutput: true, "-r", runtime)
73CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
116CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true, ConsoleLoggerOutputNormal)
136new DotnetTestCommand(Log, disableNewOutput: true, ConsoleLoggerOutputNormal)
165new DotnetNewCommand(Log, "sln")
172new DotnetCommand(Log, "sln", "add", libraryProject.Name)
178new DotnetCommand(Log, "sln", "add", testProject.Name)
184new DotnetTestCommand(Log, disableNewOutput: true, ConsoleLoggerOutputNormal)
CommandTests\Test\GivenDotnetTestBuildsAndRunsTests.cs (20)
25CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
50CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
77CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
103CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
133CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
161CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
180CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
200CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
225CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
255CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
275CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
295CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
315CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
335CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
361CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
389CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
415CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
435CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
449CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
488CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsWithDifferentOptions.cs (25)
27CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
46CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
66CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
84CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
103CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
122CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
143CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
163CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
183CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
203CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
222CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
242CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
270CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
290CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
308CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
328CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
353CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
373CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
389CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
415CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
440CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
474CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
512CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
542CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
560CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
GivenFrameworkReferences.cs (5)
102.Restore(Log, testProject.Name);
139.Restore(Log, testProject.Name);
858var getValuesCommand = new GetValuesCommand(Log, projectFolder, testProject.TargetFrameworks,
1008var getValuesCommand = new GetValuesCommand(Log, projectFolder, testProject.TargetFrameworks, "Reference", GetValuesCommand.ValueType.Item);
1160var command = new GetValuesCommand(Log, Path.Combine(testAsset.Path, testProject.Name), targetFramework,
GivenThatWeWantToBuildADesktopExe.cs (5)
164var getValueCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, "PlatformTarget");
224var runCommand = new RunExeCommand(Log, exe);
325var runCommand = new RunExeCommand(Log, exe);
355var getValuesCommand = new GetValuesCommand(Log, testAsset.TestRoot,
376var getValuesCommand = new GetValuesCommand(Log, testAsset.TestRoot,
GivenThatWeWantToBuildALibrary.cs (17)
266var restoreCommand = new RestoreCommand(Log, libraryProjectDirectory, "TestLibrary.different_language_proj");
287var getValuesCommand = new GetValuesCommand(Log, libraryProjectDirectory,
367var getValuesCommand = new GetValuesCommand(Log, libraryProjectDirectory,
462var getValuesCommand = new GetValuesCommand(Log, libraryProjectDirectory,
542var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.Path, testProj.Name));
548var runCommand = new RunExeCommand(Log, Path.Combine(buildCommand.GetOutputDirectory(targetFramework).FullName, $"{testProj.Name}.exe"));
602var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), targetFramework, "TargetPlatformIdentifier");
633var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), targetFramework, "TargetPlatformVersion");
673new DotnetNewCommand(Log)
681new DotnetCommand(Log)
689restoreCommand = testAsset.GetRestoreCommand(Log, relativePathToSln);
694restoreCommand = testAsset.GetRestoreCommand(Log, testProject.Name);
728var restoreCommand = testAsset.GetRestoreCommand(Log, relativePath: testProject.Name);
766.Restore(Log, testProject.Name);
836Log,
1055var getValuesCommand = new GetValuesCommand(Log, projectFolder,
1134var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, "TestLibrary"), targetFramework, "PackageConflictPreferredPackages");
GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs (11)
20var runCommand = new DotnetCommand(Log, "run")
45var runCommand = new DotnetCommand(Log, "run")
69var runCommand = new DotnetCommand(Log, "run")
88var runCommand = new DotnetCommand(Log, "run")
108var runCommand = new DotnetCommand(Log, "run")
127var runCommand = new DotnetCommand(Log, "run")
152var buildCommand = new DotnetBuildCommand(Log, Path.Combine(testAsset.Path, "Project", "Project.csproj"));
166var runCommand = new DotnetCommand(Log, "run")
185var runCommand = new DotnetCommand(Log, "run")
214var runCommand = new DotnetCommand(Log, "run")
263var runCommand = new DotnetCommand(Log, "run")
GivenThatWeWantToBuildANetCoreApp.cs (6)
210.Restore(Log, testProject.Name);
241var getValuesCommand = new GetValuesCommand(Log, testAsset.TestRoot,
365new DotnetCommand(Log, Path.Combine(outputFolder, project.Name + ".dll"))
782Log,
1123var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.Path, testProj.Name));
1129var runCommand = new RunExeCommand(Log, Path.Combine(buildCommand.GetOutputDirectory(ToolsetInfo.CurrentTargetFramework).FullName, $"{testProj.Name}{EnvironmentInfo.ExecutableExtension}"));
GivenThatWeWantToBuildWithATargetPlatform.cs (3)
32var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.Path, testProj.Name), targetFramework, valueName);
70var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.Path, testProj.Name), targetFramework, "TargetPlatformIdentifier");
88var build = new BuildCommand(Log, Path.Combine(testAsset.Path, testProject.Name));
GivenThatWeWantToControlGeneratedAssemblyInfo.cs (7)
96var command = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, valueName: "InformationalVersion");
127var command = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, valueName: "InformationalVersion");
159var command = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, valueName: "InformationalVersion");
195var command = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, valueName: "InformationalVersion");
232var command = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, valueName: "InformationalVersion");
690.Restore(Log, testProject.Name);
862var result = new DotnetCommand(Log, "exec", exePath).Execute();
GivenThatWeWantToResolveRuntimePackAssets.cs (2)
34Log,
76Log,
GivenThatWeWantToUsePlatformAnalyzers.cs (9)
49Log,
95Log,
141Log,
187Log,
233Log,
279var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
318Log,
364Log,
410Log,
GivenThereAreDefaultItems.cs (24)
36var compileItems = GivenThatWeWantToBuildALibrary.GetValuesFromTestLibrary(Log, _testAssetsManager, "Compile", setup);
75var compileItems = GivenThatWeWantToBuildALibrary.GetValuesFromTestLibrary(Log, _testAssetsManager, "Compile", setup, projectChanges: projectChanges);
116var compileItems = GivenThatWeWantToBuildALibrary.GetValuesFromTestLibrary(Log, _testAssetsManager,
158var compileItems = GivenThatWeWantToBuildALibrary.GetValuesFromTestLibrary(Log, _testAssetsManager, "Compile", setup, projectChanges: projectChanges);
194var compileItems = GivenThatWeWantToBuildALibrary.GetValuesFromTestLibrary(Log, _testAssetsManager, "Compile", setup, projectChanges: projectChanges);
231var compileItems = GivenThatWeWantToBuildALibrary.GetValuesFromTestLibrary(Log, _testAssetsManager, "Compile", setup, projectChanges: projectChanges);
268var compileItems = GivenThatWeWantToBuildALibrary.GetValuesFromTestLibrary(Log, _testAssetsManager, "Compile", setup, projectChanges: projectChanges);
283var embeddedResourceItems = GivenThatWeWantToBuildALibrary.GetValuesFromTestLibrary(Log, _testAssetsManager, "EmbeddedResource", setup, projectChanges: projectChanges, identifier: "EmbeddedResource");
319var compileItems = GivenThatWeWantToBuildALibrary.GetValuesFromTestLibrary(Log, _testAssetsManager, "Compile", setup, projectChanges: projectChanges);
334var contentItems = GivenThatWeWantToBuildALibrary.GetValuesFromTestLibrary(Log, _testAssetsManager, "Content", setup, projectChanges: projectChanges, identifier: "Content");
345var noneItems = GivenThatWeWantToBuildALibrary.GetValuesFromTestLibrary(Log, _testAssetsManager, "None", setup, projectChanges: projectChanges, identifier: expectedContentItems.GetHashCode().ToString());
394var getCompileItemsCommand = new GetValuesCommand(Log, projectFolder, testProject.TargetFrameworks, "Compile", GetValuesCommand.ValueType.Item);
404var getNoneItemsCommand = new GetValuesCommand(Log, projectFolder, testProject.TargetFrameworks, "None", GetValuesCommand.ValueType.Item);
413var getResourceItemsCommand = new GetValuesCommand(Log, projectFolder, testProject.TargetFrameworks, "Resource", GetValuesCommand.ValueType.Item);
422var getPRIResourceItemsCommand = new GetValuesCommand(Log, projectFolder, testProject.TargetFrameworks, "PRIResource", GetValuesCommand.ValueType.Item);
431var getContentItemsCommand = new GetValuesCommand(Log, projectFolder, testProject.TargetFrameworks, "Content", GetValuesCommand.ValueType.Item);
508GivenThatWeWantAllResourcesInSatellite.TestSatelliteResources(Log, _testAssetsManager, projectChanges, setup, "ExplicitCompileDefaultEmbeddedResource");
727var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name),
775var getNoneItemsCommand = new GetValuesCommand(Log, projectFolder, testProject.TargetFrameworks, "None", GetValuesCommand.ValueType.Item);
785var getPRIResourceItemsCommand = new GetValuesCommand(Log, projectFolder, testProject.TargetFrameworks, "PRIResource", GetValuesCommand.ValueType.Item);
794var getContentItemsCommand = new GetValuesCommand(Log, projectFolder, testProject.TargetFrameworks, "Content", GetValuesCommand.ValueType.Item);
826var getNoneItemsCommand = new GetValuesCommand(Log, projectFolder, testProject.TargetFrameworks, "None", GetValuesCommand.ValueType.Item);
837var getPRIResourceItemsCommand = new GetValuesCommand(Log, projectFolder, testProject.TargetFrameworks, "PRIResource", GetValuesCommand.ValueType.Item);
847var getContentItemsCommand = new GetValuesCommand(Log, projectFolder, testProject.TargetFrameworks, "Content", GetValuesCommand.ValueType.Item);
GiventThatWeWantDesignerSupport.cs (1)
68Log,
GivenWeWantToRequireWindowsForDesktopApps.cs (7)
151new BuildCommand(Log, testInstance.Path)
178var command = new BuildCommand(Log, Path.Combine(asset.Path, ProjectName));
206var command = new BuildCommand(Log, Path.Combine(asset.Path, ProjectName));
237var buildCommand = new BuildCommand(Log, Path.Combine(asset.Path, ProjectName));
263Log,
291Log,
359Log,
ReferenceExeTests.cs (10)
149new RunExeCommand(Log, mainExePath)
157var referencedExeResult = new RunExeCommand(Log, referencedExePath)
349new DotnetNewCommand(Log, testTemplateName)
356new DotnetCommand(Log, "add", "reference", ".." + Path.DirectorySeparatorChar + testConsoleProject.Name)
362new BuildCommand(Log, testProjectDirectory)
415var result = new BuildCommand(Log, mtpProjectDirectory).Execute();
464var result = new BuildCommand(Log, consoleAppDirectory).Execute();
493new DotnetNewCommand(Log, testTemplateName)
502new DotnetCommand(Log, "add", "reference", ".." + Path.DirectorySeparatorChar + "TestProject")
548new BuildCommand(Log, mtpProjectDirectory)