why the hell don't you work

This commit is contained in:
Brendan Forster
2015-01-04 16:01:17 +09:30
parent c56e5711c9
commit e033308742
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Xunit;
using Xunit.Abstractions;
using Xunit.Sdk;
@@ -14,12 +13,11 @@ namespace Octokit.Tests.Integration
if (String.IsNullOrWhiteSpace(Helper.ClientId)
&& String.IsNullOrWhiteSpace(Helper.ClientSecret))
{
return Enumerable.Empty<IXunitTestCase>();
}
else
{
return new[] { new XunitTestCase(testMethod) };
yield return new SkipTestCase(testMethod,
"Environment variables are not set for this test - set OCTOKIT_CLIENTID and OCTOKIT_CLIENTSECRET");
}
yield return new XunitTestCase(testMethod);
}
}
@@ -27,4 +25,13 @@ namespace Octokit.Tests.Integration
public class ApplicationTestAttribute : FactAttribute
{
}
public class SkipTestCase : XunitTestCase
{
public SkipTestCase(ITestMethod testMethod, string skipReason)
: base(testMethod)
{
SkipReason = skipReason;
}
}
}