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