mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
34 lines
809 B
C#
34 lines
809 B
C#
using System;
|
|
using NSubstitute;
|
|
using Octokit.Reactive;
|
|
using Xunit;
|
|
|
|
namespace Octokit.Tests.Reactive
|
|
{
|
|
public class ObservableMetaClientTests
|
|
{
|
|
public class TheGetMetadataMethod
|
|
{
|
|
[Fact]
|
|
public void CallsIntoClient()
|
|
{
|
|
var gitHubClient = Substitute.For<IGitHubClient>();
|
|
var client = new ObservableMetaClient(gitHubClient);
|
|
|
|
client.GetMetadata();
|
|
|
|
gitHubClient.Meta.Received(1).GetMetadata();
|
|
}
|
|
}
|
|
|
|
public class TheCtor
|
|
{
|
|
[Fact]
|
|
public void EnsuresNonNullArguments()
|
|
{
|
|
Assert.Throws<ArgumentNullException>(() => new ObservableMetaClient((IGitHubClient)null));
|
|
}
|
|
}
|
|
}
|
|
}
|