public void ItTestsWithTheSpecifiedRuntimeOption()
        {
            var testInstance = _testAssetsManager.CopyTestAsset("XunitCore")
                               .WithSource()
                               .WithVersionVariables();

            var rootPath = testInstance.Path;
            var rid      = EnvironmentInfo.GetCompatibleRid();

            new DotnetBuildCommand(Log)
            .WithWorkingDirectory(rootPath)
            .Execute("--runtime", rid)
            .Should()
            .Pass()
            .And.NotHaveStdErr();

            var result = new DotnetTestCommand(Log, ConsoleLoggerOutputNormal)
                         .WithWorkingDirectory(rootPath)
                         .Execute("--no-build", "--runtime", rid);

            result
            .Should()
            .NotHaveStdErrContaining("MSB1001")
            .And
            .HaveStdOutContaining(rid);

            if (!TestContext.IsLocalized())
            {
                result.StdOut.Should().Contain("Total tests: 2");
                result.StdOut.Should().Contain("Passed: 1");
                result.StdOut.Should().Contain("Failed: 1");
            }

            result.ExitCode.Should().Be(1);
        }
        public void ItTestsWithTheSpecifiedRuntimeOption()
        {
            var testInstance = TestAssets.Get("XunitCore")
                               .CreateInstance()
                               .WithSourceFiles();

            var rootPath = testInstance.Root.FullName;
            var rid      = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();

            new BuildCommand()
            .WithWorkingDirectory(rootPath)
            .ExecuteWithCapturedOutput($"--runtime {rid}")
            .Should()
            .Pass()
            .And.NotHaveStdErr();

            var result = new DotnetTestCommand()
                         .WithWorkingDirectory(rootPath)
                         .ExecuteWithCapturedOutput($"{TestBase.ConsoleLoggerOutputNormal} --no-build --runtime {rid}");

            result
            .Should()
            .NotHaveStdErrContaining("MSB1001")
            .And
            .HaveStdOutContaining(rid);

            if (!DotnetUnderTest.IsLocalized())
            {
                result.StdOut.Should().Contain("Total tests: 2");
                result.StdOut.Should().Contain("Passed: 1");
                result.StdOut.Should().Contain("Failed: 1");
            }

            result.ExitCode.Should().Be(1);
        }