mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 04:16:51 +00:00
why the hell don't you work
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user