245 references to Lines
dotnet.Tests (217)
BuildServerTests\BuildServerProviderTests.cs (1)
177reporter.Lines.Should().Equal(
CommandTests\BuildServer\Shutdown\BuildServerShutdownCommandTests.cs (6)
40_reporter.Lines.Should().Equal(CliCommandStrings.NoServersToShutdown.Green()); 58_reporter.Lines.Should().Equal(CliCommandStrings.NoServersToShutdown.Green()); 76_reporter.Lines.Should().Equal(CliCommandStrings.NoServersToShutdown.Green()); 94_reporter.Lines.Should().Equal(CliCommandStrings.NoServersToShutdown.Green()); 117_reporter.Lines.Should().Equal( 149_reporter.Lines.Should().Equal(
CommandTests\Hidden\Complete\CompleteCommandTests.cs (18)
59reporter.Lines.OrderBy(c => c).Should().Equal(expected.OrderBy(c => c)); 81reporter.Lines.OrderBy(c => c).Should().Equal(expected.OrderBy(c => c)); 103reporter.Lines.OrderBy(c => c).Should().Contain(expected.OrderBy(c => c)); 129reporter.Lines.OrderBy(c => c).Should().Equal(expected.OrderBy(c => c)); 153reporter.Lines.OrderBy(c => c).Should().Equal(expected.OrderBy(c => c)); 179reporter.Lines.OrderBy(c => c).Should().Equal(expected.OrderBy(c => c)); 214reporter.Lines.OrderBy(c => c).Should().Equal(expected.OrderBy(c => c)); 234reporter.Lines.OrderBy(c => c).Should().Equal(expected.OrderBy(c => c)); 260reporter.Lines.OrderBy(c => c).Should().Equal(expected.OrderBy(c => c)); 290reporter.Lines.OrderBy(c => c).Should().Equal(expected.OrderBy(c => c)); 308reporter.Lines.OrderBy(c => c).Should().Equal(expected.OrderBy(c => c)); 320reporter.Lines.OrderBy(c => c).Should().Equal(expected.OrderBy(c => c)); 333reporter.Lines.OrderBy(c => c).Should().Equal(expected.OrderBy(c => c)); 349reporter.Lines.Should().Contain(expected); 371reporter.Lines.Should().Contain(knownVersion); 394reporter.Lines.Should().Contain(expectedVersions); 396reporter.Lines.Should().AllSatisfy(v => v.Should().NotContain("-")); 420reporter.Lines.Should().Equal(expectedVersions);
CommandTests\Sdk\Check\GivenDotnetSdkCheck.cs (10)
60_reporter.Lines 66string.Join(' ', _reporter.Lines) 82string.Join(' ', _reporter.Lines) 89string.Join(' ', _reporter.Lines) 92string.Join(' ', _reporter.Lines) 113var commandResult = string.Join(' ', _reporter.Lines); 139var commandResult = string.Join(' ', _reporter.Lines); 173var commandResult = string.Join('\n', _reporter.Lines); 206_reporter.Lines.Count().Should().Be(3); 207_reporter.Lines.Should().Contain(replacementString);
CommandTests\Tool\Install\ToolInstallGlobalOrToolPathCommandTests.cs (18)
235_reporter.Lines.First().Should().Be(EnvironmentPathInstructionMock.MockInstructionText); 259_reporter.Lines.First().Should().Be(CliStrings.FormatVersionIsHigher.Yellow()); 260_reporter.Lines.Skip(1).First().Should().Be(EnvironmentPathInstructionMock.MockInstructionText); 348.Lines 372.Lines 420.Lines 445.Lines 456_reporter.Lines.Should().Equal(string.Format(CliCommandStrings.ToolAlreadyInstalled, PackageId, PackageVersion).Green()); 477.Lines 499.Lines 526.Lines 548.Lines 575.Lines 614.Lines 692.Lines 817.Lines 841_reporter.Lines.Should().NotContain(l => l.Contains(EnvironmentPathInstructionMock.MockInstructionText)); 855_reporter.Lines.Should().NotContain(l => l.Contains(CliStrings.NuGetPackageSignatureVerificationSkipped));
CommandTests\Tool\Install\ToolInstallLocalCommandTests.cs (1)
261_reporter.Lines[0].Should()
CommandTests\Tool\List\ToolListGlobalOrToolPathCommandTests.cs (11)
40_reporter.Lines.Should().Equal(EnumerateExpectedTableLines(store.Object)); 76_reporter.Lines.Should().Equal(EnumerateExpectedTableLines(store.Object)); 104_reporter.Lines.Should().Equal(EnumerateExpectedTableLines(store.Object)); 125_reporter.Lines.Should().Equal(EnumerateExpectedTableLines(store.Object)); 156_reporter.Lines.Should().Equal(EnumerateExpectedTableLines(store.Object)); 183_reporter.Lines.Count.Should().Be(1); 185var versionedData = System.Text.Json.JsonSerializer.Deserialize<VersionedDataContract<ToolListJsonContract[]>>(_reporter.Lines[0]); 217_reporter.Lines.Should().Equal(EnumerateExpectedTableLines(store.Object)); 244_reporter.Lines.Should().Equal( 290_reporter.Lines.Should().Equal(EnumerateExpectedTableLines(store.Object, new PackageId("test.tool"))); 311_reporter.Lines.Should().Equal(EnumerateExpectedTableLines(store.Object, new PackageId("not-installed-package")));
CommandTests\Tool\List\ToolListLocalCommandTests.cs (26)
61_reporter.Lines.Count.Should().Be(4); 62_reporter.Lines.Should().Contain(l => l.Contains("package.id")); 63_reporter.Lines.Should().Contain(l => l.Contains("2.1.4")); 64_reporter.Lines.Should().Contain(l => l.Contains(_testManifestPath)); 65_reporter.Lines.Should().Contain(l => l.Contains("package-name")); 66_reporter.Lines.Should().Contain(l => l.Contains("foo.bar")); 67_reporter.Lines.Should().Contain(l => l.Contains("1.0.8")); 68_reporter.Lines.Should().Contain(l => l.Contains(_testManifestPath)); 69_reporter.Lines.Should().Contain(l => l.Contains("foo-bar")); 79_reporter.Lines.Count.Should().Be(1); 81var versionedData = JsonSerializer.Deserialize<VersionedDataContract<LocalToolListJsonContract[]>>(_reporter.Lines[0]); 103_reporter.Lines.Count.Should().Be(4); 104_reporter.Lines.Should().Contain(l => l.Contains("package.id")); 105_reporter.Lines.Should().Contain(l => l.Contains("2.1.4")); 106_reporter.Lines.Should().Contain(l => l.Contains(_testManifestPath)); 107_reporter.Lines.Should().Contain(l => l.Contains("package-name")); 108_reporter.Lines.Should().Contain(l => l.Contains("foo.bar")); 109_reporter.Lines.Should().Contain(l => l.Contains("1.0.8")); 110_reporter.Lines.Should().Contain(l => l.Contains(_testManifestPath)); 111_reporter.Lines.Should().Contain(l => l.Contains("foo-bar")); 118_reporter.Lines.Count.Should().Be(3); 119_reporter.Lines.Should().Contain(l => l.Contains("package.id")); 120_reporter.Lines.Should().Contain(l => l.Contains("2.1.4")); 121_reporter.Lines.Should().Contain(l => l.Contains(_testManifestPath)); 122_reporter.Lines.Should().Contain(l => l.Contains("package-name")); 129_reporter.Lines.Count.Should().Be(2);
CommandTests\Tool\Restore\ToolRestoreCommandTests.cs (8)
176_reporter.Lines.Should().Contain(l => l.Contains(string.Format( 179_reporter.Lines.Should().Contain(l => l.Contains(string.Format( 183_reporter.Lines.Should().Contain(l => l.Contains("\x1B[32m"), 269_reporter.Lines.Should() 273_reporter.Lines.Should().Contain(l => l.Contains(CliCommandStrings.RestorePartiallyFailed)); 310_reporter.Lines.Should() 453_reporter.Lines.Should() 531_reporter.Lines.Should().Contain(l =>
CommandTests\Tool\Search\SearchResultPrinterTests.cs (9)
63_reporter.Lines.Should().Contain(l => l.Contains(expectedInformationToBePresent), 66_reporter.Lines.Should().NotContain(l => l.Contains(_filledSearchResultPackage.Description)); 67_reporter.Lines.Should().NotContain(l => l.Contains(_filledSearchResultPackage.Summary)); 68_reporter.Lines.Should().NotContain(l => l.Contains(_filledSearchResultPackage.Tags.First())); 91_reporter.Lines.Should().Contain(l => l.Contains(expectedInformationToBePresent), 101_reporter.Lines.Count.Should().Be(1); 102_reporter.Lines.Should().Contain(CliCommandStrings.NoResult); 111_reporter.Lines.Count.Should().Be(1); 112_reporter.Lines.Should().Contain(CliCommandStrings.NoResult);
CommandTests\Tool\Uninstall\ToolUninstallGlobalOrToolPathCommandTests.cs (7)
63.Lines 82_reporter.Lines.Clear(); 87.Lines 105.Lines 124_reporter.Lines.Clear(); 157.Lines 175.Lines
CommandTests\Tool\Uninstall\ToolUninstallLocalCommandTests.cs (3)
131_reporter.Lines.Single() 173_reporter.Lines[0].Should().Contain(parentManifestFilePath); 174_reporter.Lines[0].Should().NotContain(_manifestFilePath);
CommandTests\Tool\Update\ToolUpdateGlobalOrToolPathCommandTests.cs (21)
206_reporter.Lines.Clear(); 212_reporter.Lines.First().Should().Contain(string.Format( 221_reporter.Lines.Clear(); 227_reporter.Lines.First().Should().Contain(string.Format( 237_reporter.Lines.Clear(); 242_reporter.Lines.First().Should().Contain(string.Format( 251_reporter.Lines.Clear(); 266_reporter.Lines.Clear(); 272_reporter.Lines.First().Should().Contain(string.Format( 281_reporter.Lines.Clear(); 287_reporter.Lines.First().Should().Contain(string.Format( 296_reporter.Lines.Clear(); 302_reporter.Lines.First().Should().Contain(string.Format( 311_reporter.Lines.Clear(); 331_reporter.Lines.Clear(); 337_reporter.Lines.First().Should().Contain(string.Format( 346_reporter.Lines.Clear(); 352_reporter.Lines.First().Should().Contain(string.Format( 361_reporter.Lines.Clear(); 388_reporter.Lines.Clear(); 425_reporter.Lines.Clear();
CommandTests\Tool\Update\ToolUpdateLocalCommandTests.cs (4)
302_reporter.Lines.Single() 341_reporter.Lines[0].Should().Contain(parentManifestFilePath); 342_reporter.Lines[0].Should().NotContain(_manifestFilePath); 355_reporter.Lines.Single()
CommandTests\Workload\Install\GivenDotnetWorkloadInstall.cs (10)
120string.Join(" ", _reporter.Lines).Should().Contain("Rollback failure"); 158string.Join(" ", _reporter.Lines).Should().Contain("Failing garbage collection"); 187_reporter.Lines.Should().Contain("There are no installed workloads to display."); 321string.Join(" ", _reporter.Lines).Should().Contain("http://mock-url/xamarin.android.sdk.8.4.7.nupkg"); 322string.Join(" ", _reporter.Lines).Should().Contain("http://mock-url/mock-manifest-package.1.0.5.nupkg"); 523string.Join(" ", _reporter.Lines).Should().Contain("Workload installation failed."); 548string.Join(" ", _reporter.Lines).Should().Contain("Invalid rollback definition. The manifest IDs in rollback definition"); 581string.Join(" ", _reporter.Lines).Should().Contain(string.Format(CliCommandStrings.WorkloadAlreadyInstalled, workloadId)); 638string.Join(" ", _reporter.Lines).Should().Contain(CliCommandStrings.CheckForUpdatedWorkloadManifests); 639string.Join(" ", _reporter.Lines).Should().Contain(string.Format(CliCommandStrings.CheckForUpdatedWorkloadManifests, "mock-manifest"));
CommandTests\Workload\Install\GivenWorkloadManifestUpdater.cs (8)
281_reporter.Lines.Should().NotContain(l => l.ToLowerInvariant().Contains("fail")); 282_reporter.Lines.Should().NotContain(string.Format(CliCommandStrings.AdManifestPackageDoesNotExist, testManifestName)); 348_reporter.Lines.Should().NotContain(l => l.ToLowerInvariant().Contains("fail")); 349_reporter.Lines.Should().Contain(string.Format(CliCommandStrings.AdManifestPackageDoesNotExist, testManifestName)); 414_reporter.Lines.Should().NotContain(l => l.ToLowerInvariant().Contains("fail")); 415_reporter.Lines.Should().Contain(string.Format(CliCommandStrings.AdManifestPackageDoesNotExist, testManifestName)); 496string.Join(" ", _reporter.Lines).Should().Contain(rollbackDefPath); 538string.Join(" ", _reporter.Lines).Should().Contain(rollbackDefPath);
CommandTests\Workload\Install\WorkloadInstallAspireDeprecationTests.cs (5)
50_reporter.Lines.Should().Contain(line => line.Contains("Aspire workload is deprecated")); 51_reporter.Lines.Should().Contain(line => line.Contains("https://aka.ms/aspire/support-policy")); 85_reporter.Lines.Should().Contain(line => line.Contains("Aspire workload is deprecated")); 86_reporter.Lines.Should().Contain(line => line.Contains("https://aka.ms/aspire/support-policy")); 123var deprecationLines = _reporter.Lines.Where(line => line.Contains("Aspire workload is deprecated")).ToList();
CommandTests\Workload\List\GivenDotnetWorkloadList.cs (5)
40_reporter.Lines.Count.Should().Be(8); 64_reporter.Lines.Should().Contain(l => l.Contains(@"""installed"":[]")); 79_reporter.Lines.Select(line => line.Trim()).Should().Contain($"{workload} 5.0.0/6.0.100 SDK 6.0.100"); 92_reporter.Lines.Should().Contain(l => l.Contains("{\"installed\":[\"mock-workload-1\",\"mock-workload-2\",\"mock-workload-3\"]")); 114_reporter.Lines.Should().Contain(string.Format(CliCommandStrings.WorkloadListWorkloadUpdatesAvailable, "mock-workload-1 mock-workload-3"));
CommandTests\Workload\List\GivenWorkloadInstallerAndWorkloadsInstalled.cs (1)
144_reporter.Lines.Should().Contain(c => c.Contains("\"installed\":[\"xamarin-android\"]"));
CommandTests\Workload\Repair\GivenDotnetWorkloadRepair.cs (1)
55_reporter.Lines.Should().Contain(CliCommandStrings.NoWorkloadsToRepair);
CommandTests\Workload\Search\GivenDotnetWorkloadSearch.cs (13)
62_reporter.Lines.Count.Should().Be(4, because: "Output should have header and no values."); 109_reporter.Lines.Count.Should().Be(1); 110_reporter.Lines.Single().Should().Be("9.0.101"); 123var output = string.Join(" ", _reporter.Lines); 144var output = string.Join(" ", _reporter.Lines); 165var output = string.Join(" ", _reporter.Lines); 187_reporter.Lines[3].Should().Contain("fake-workload-1"); 188_reporter.Lines[4].Should().Contain("fake-workload-2"); 189_reporter.Lines[5].Should().Contain("mock-workload-1"); 190_reporter.Lines[6].Should().Contain("mock-workload-2"); 191_reporter.Lines[7].Should().Contain("mock-workload-3"); 204_reporter.Lines.Count.Should().Be(5); 205_reporter.Lines[3].Should().Contain("fake-workload-2");
CommandTests\Workload\Update\GivenDotnetWorkloadUpdate.cs (8)
464string.Join(" ", _reporter.Lines).Should().Contain("http://mock-url/xamarin.android.templates.1.0.3.nupkg", "New pack urls should be included in output"); 465string.Join(" ", _reporter.Lines).Should().Contain("http://mock-url/xamarin.android.framework.8.4.0.nupkg", "Urls for packs with updated versions should be included in output"); 466string.Join(" ", _reporter.Lines).Should().NotContain("xamarin.android.sdk", "Urls for packs with the same version should not be included in output"); 478string.Join(" ", _reporter.Lines).Should().Contain("http://mock-url/xamarin.android.templates.1.0.3.nupkg", "New pack urls should be included in output"); 479string.Join(" ", _reporter.Lines).Should().Contain("http://mock-url/xamarin.android.framework.8.4.0.nupkg", "Urls for packs with updated versions should be included in output"); 480string.Join(" ", _reporter.Lines).Should().NotContain("xamarin.android.sdk", "Urls for packs with the same version should not be included in output"); 516_reporter.Lines.Count().Should().Be(1); 517string.Join("", _reporter.Lines).Should().Contain("samplemanifest");
ConfigurerTests\GivenADotnetFirstTimeUseConfigurerWIthStateSetup.cs (3)
105() => _reporterMock.Lines.Contains(string.Format( 109&& _reporterMock.Lines.Contains(LocalizableStrings.FirstTimeMessageMoreInformation), 113() => _reporterMock.Lines.Contains(LocalizableStrings.TelemetryMessage),
ShellShimTests\LinuxEnvironmentPathTests.cs (5)
36reporter.Lines.Should().Equal( 65reporter.Lines.Should().Equal(CliStrings.EnvironmentPathLinuxNeedLogout); 90reporter.Lines.Should().BeEmpty(); 114reporter.Lines.Should().BeEmpty(); 144reporter.Lines.Should().BeEmpty();
ShellShimTests\OsxEnvironmentPathTests.cs (5)
36reporter.Lines.Should().Equal( 65reporter.Lines.Should().Equal(CliStrings.EnvironmentPathOSXNeedReopen); 90reporter.Lines.Should().BeEmpty(); 114reporter.Lines.Should().BeEmpty(); 144reporter.Lines.Should().BeEmpty();
ShellShimTests\OsxZshEnvironmentPathInstructionTests.cs (3)
39reporter.Lines.Should().Equal( 67reporter.Lines.Should().BeEmpty(); 96reporter.Lines.Should().Equal(
ShellShimTests\WindowsEnvironmentPathTests.cs (7)
42_reporter.Lines.Should().BeEmpty(); 53_reporter.Lines.Should().Equal(CliStrings.EnvironmentPathWindowsNeedReopen); 63_reporter.Lines.Should().BeEmpty("No message since this happens in first run experience"); 75_reporter.Lines.Should().BeEmpty(); 85_reporter.Lines.Should().Equal( 100_reporter.Lines.Should().BeEmpty(); 112_reporter.Lines.Should().BeEmpty();
Microsoft.DotNet.PackageInstall.Tests (5)
NuGetPackageInstallerTests.cs (2)
249bufferedReporter.Lines.Should() 273bufferedReporter.Lines.Should().BeEmpty();
ToolPackageDownloaderTests.cs (2)
577reporter.Lines.Should().BeEmpty(); 832reporter.Lines.Should().BeEmpty();
ToolPackageInstallerNugetCacheTests.cs (1)
60foreach (var line in reporter.Lines)
Microsoft.NET.TestFramework (12)
Utilities\BufferedReporter.cs (12)
18Lines.Add(message); 23Lines[Lines.Count - 1] = Lines[Lines.Count - 1] + message; 32Lines.Add(""); 45Lines.Add(message); 49Lines[Lines.Count - 1] = Lines[Lines.Count - 1] + message; 55Lines.Clear();
Microsoft.TemplateEngine.Cli.UnitTests (11)
ParserTests\HelpTests.Resolution.cs (5)
35Assert.Empty(reporter.Lines); 61return Verify(string.Join(Environment.NewLine, reporter.Lines)); 92Assert.Empty(reporter.Lines); 122Assert.Empty(reporter.Lines); 147Assert.Empty(reporter.Lines);
TemplatePackageCoordinatorTests.cs (6)
40bufferedReporter.Lines.Should() 63bufferedReporter.Lines.Should() 99bufferedReporter.Lines.Should() 146bufferedReporter.Lines.Should() 193bufferedReporter.Lines.Should() 236bufferedReporter.Lines.Should()