mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
[FEAT]: Add support for Public Keys API (#2945)
* 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>
This commit is contained in:
33
Octokit.Tests/Reactive/ObservablePublicKeysClientTests.cs
Normal file
33
Octokit.Tests/Reactive/ObservablePublicKeysClientTests.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user