Пример #1
0
 public void BeforeTest(ITest testDetails)
 {
     if (ScriptingEnvironment.IsRunningOnMono() && (ScriptingEnvironment.GetMonoVersion() < new Version(major, minor, build)))
     {
         Assert.Ignore($"Requires Mono {major}.{minor}.{build} or above");
     }
 }
Пример #2
0
 public void BeforeTest(TestDetails testDetails)
 {
     if (ScriptingEnvironment.IsRunningOnMono() && (ScriptingEnvironment.GetMonoVersion() < new Version(4, 0, 0)))
     {
         Assert.Ignore("Requires Mono 4");
     }
 }
 public void BeforeTest(ITest testDetails)
 {
     if (ScriptingEnvironment.IsRunningOnMono() && (Environment.GetEnvironmentVariable("TEAMCITY_BUILDCONF_NAME")?.Contains("FreeBSD") ?? false))
     {
         Assert.Ignore($"This test does not run on FreeBSD");
     }
 }
Пример #4
0
 public void ApplyToTest(Test test)
 {
     if (ScriptingEnvironment.IsRunningOnMono() && (Environment.GetEnvironmentVariable("TEAMCITY_BUILDCONF_NAME")?.Contains("FreeBSD") ?? false))
     {
         test.RunState = RunState.Skipped;
         test.Properties.Set(PropertyNames.SkipReason, "This test does not run on FreeBSD");
     }
 }
        public void ApplyToTest(Test test)
        {
            if (ScriptingEnvironment.IsRunningOnMono() && (Environment.GetEnvironmentVariable("TEAMCITY_BUILDCONF_NAME")?.Contains("FreeBSD") ?? false))
            {
                var skipReason = "This test does not run on FreeBSD";
                if (!string.IsNullOrWhiteSpace(reason))
                {
                    skipReason += $" because {reason}";
                }

                test.RunState = RunState.Skipped;
                test.Properties.Set(PropertyNames.SkipReason, skipReason);
            }
        }
Пример #6
0
        [RequiresMonoVersion423OrAbove] //Bug in mono < 4.2.3 https://bugzilla.xamarin.com/show_bug.cgi?id=19426
        public void ShouldInvokeDeployFailedOnError()
        {
            Variables.Set("ShouldFail", "yes");
            var result = DeployPackage();

            if (ScriptingEnvironment.IsRunningOnMono())
            {
                result.AssertOutput("I have failed! DeployFailed.sh");
            }
            else
            {
                result.AssertOutput("I have failed! DeployFailed.ps1");
            }
            result.AssertOutput("I have failed! DeployFailed.fsx");
            result.AssertOutput("I have failed! DeployFailed.csx");
        }