mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 12:03:19 +00:00
the other tests no wpass
This commit is contained in:
@@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user