the other tests no wpass

This commit is contained in:
Brendan Forster
2014-12-17 20:16:02 +09:30
parent 2b2fa1c5e3
commit 491e54d26e
7 changed files with 88 additions and 38 deletions
@@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
using Xunit.Sdk;
namespace Octokit.Tests.Integration
{
public class OrganizationTestDiscoverer : IXunitTestCaseDiscoverer
{
public IEnumerable<IXunitTestCase> Discover(ITestMethod testMethod, IAttributeInfo factAttribute)
{
if (Helper.Organization == null)
{
return Enumerable.Empty<IXunitTestCase>();
}
else
{
return new[] { new OrganizationTestCase(testMethod) };
}
}
}
[XunitTestCaseDiscoverer("Octokit.Tests.Integration.OrganizationTestDiscoverer", "Octokit.Tests.Integration")]
public class OrganizationTestAttribute : FactAttribute
{
}
[Serializable]
public class OrganizationTestCase : XunitTestCase
{
public OrganizationTestCase(ITestMethod testMethod)
: base(testMethod, testMethodArguments: null)
{
}
}
}