public void SendsCreateToCorrectUrl() { var endpoint = new Uri("user/keys", UriKind.Relative); var data = new SshKeyUpdate(); var client = Substitute.For <IApiConnection>(); var sshKeysClient = new SshKeysClient(client); sshKeysClient.Create(data); client.Received().Post <SshKey>(endpoint, data); }
public void SendsCreateToCorrectUrl() { var endpoint = new Uri("user/keys", UriKind.Relative); var data = new SshKeyUpdate(); var client = Substitute.For<IApiConnection>(); var sshKeysClient = new SshKeysClient(client); sshKeysClient.Create(data); client.Received().Post<SshKey>(endpoint, data); }
public async Task EnsuresArgumentsNotNull() { var userEndpoint = new SshKeysClient(Substitute.For<IApiConnection>()); await Assert.ThrowsAsync<ArgumentNullException>(() => userEndpoint.Create(null)); }
public async Task EnsuresArgumentsNotNull() { var userEndpoint = new SshKeysClient(Substitute.For <IApiConnection>()); await Assert.ThrowsAsync <ArgumentNullException>(() => userEndpoint.Create(null)); }