mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 20:30:41 +00:00
d0c8e82453
Unused 'using' directive were removed.
38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using System;
|
|
using NSubstitute;
|
|
using Octokit.Reactive;
|
|
using Xunit;
|
|
|
|
namespace Octokit.Tests
|
|
{
|
|
public class ObservableEnterpriseOrganizationClientTests
|
|
{
|
|
public class TheCtor
|
|
{
|
|
[Fact]
|
|
public void EnsuresNonNullArguments()
|
|
{
|
|
Assert.Throws<ArgumentNullException>(
|
|
() => new ObservableEnterpriseOrganizationClient(null));
|
|
}
|
|
}
|
|
|
|
public class TheCreateMethod
|
|
{
|
|
[Fact]
|
|
public void CallsIntoClient()
|
|
{
|
|
var github = Substitute.For<IGitHubClient>();
|
|
var client = new ObservableEnterpriseOrganizationClient(github);
|
|
|
|
client.Create(new NewOrganization("org", "admin", "org name"));
|
|
github.Enterprise.Organization.Received(1).Create(
|
|
Arg.Is<NewOrganization>(a =>
|
|
a.Login == "org"
|
|
&& a.Admin == "admin"
|
|
&& a.ProfileName == "org name"));
|
|
}
|
|
}
|
|
}
|
|
}
|