mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
* Add support for /mets/public_keys/<keyType> * "files.insertFinalNewline": false * revert and make setttings.json change csharp only * formatting * remove final new line --------- Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
34 lines
870 B
C#
34 lines
870 B
C#
using System;
|
|
using NSubstitute;
|
|
using Octokit.Reactive;
|
|
using Xunit;
|
|
|
|
namespace Octokit.Tests.Reactive
|
|
{
|
|
public class ObservablePublicKeysClientTests
|
|
{
|
|
public class TheGetMethod
|
|
{
|
|
[Fact]
|
|
public void CallsIntoClient()
|
|
{
|
|
var gitHubClient = Substitute.For<IGitHubClient>();
|
|
var client = new ObservablePublicKeysClient(gitHubClient);
|
|
|
|
client.Get(PublicKeyType.SecretScanning);
|
|
|
|
gitHubClient.Meta.PublicKeys.Received(1).Get(PublicKeyType.SecretScanning);
|
|
}
|
|
}
|
|
|
|
public class TheCtor
|
|
{
|
|
[Fact]
|
|
public void EnsuresNonNullArguments()
|
|
{
|
|
Assert.Throws<ArgumentNullException>(() => new ObservablePublicKeysClient((IGitHubClient)null));
|
|
}
|
|
}
|
|
}
|
|
}
|