public void It_builds_and_runs_tests_for_netcoreapp10()
 {
     var testCommand = new DotnetTestCommand();
     var result = testCommand
         .ExecuteWithCapturedOutput($"{_projectFilePath} -f netcoreapp1.0");
     result.Should().Pass();
     result.StdOut.Should().Contain($"Skipped for NETCOREAPP1.0");
     result.StdOut.Should().NotContain($"Skipped for NET451");
 }
        public void It_runs_tests_for_all_tfms_if_they_fail()
        {
            var testCommand = new DotnetTestCommand
            {
                Environment =
                {
                    { "DOTNET_TEST_SHOULD_FAIL", "1" }
                }
            };

            var result = testCommand
                .ExecuteWithCapturedOutput($"{_projectFilePath}");

            result.Should().Fail();
            result.StdOut.Should().Contain("Failing in NET451");
            result.StdOut.Should().Contain("Failing in NETCOREAPP1.0");
        }
        public void It_prints_error_when_no_framework_matched()
        {
            var nonExistentFramework = "doesnotexisttfm99.99";
            var testCommand = new DotnetTestCommand();
            var result = testCommand
                .ExecuteWithCapturedOutput($"{_projectFilePath} -f {nonExistentFramework}");

            result.Should().Fail();
            result.StdErr.Should().Contain($"does not support framework");
        }