public void PostsToCorrectUrl() { var connection = Substitute.For<IApiConnection>(); var client = new UserEmailsClient(connection); client.Delete("*****@*****.**"); connection.Received(1) .Delete(Arg.Is<Uri>(u => u.ToString() == "user/emails"), Arg.Any<string[]>()); }
public void PostsToCorrectUrl() { var connection = Substitute.For <IApiConnection>(); var client = new UserEmailsClient(connection); client.Delete("*****@*****.**"); connection.Received(1) .Delete(Arg.Is <Uri>(u => u.ToString() == "user/emails"), Arg.Any <string[]>()); }
public async Task EnsuresNonNullArgument() { var client = new UserEmailsClient(Substitute.For <IApiConnection>()); await Assert.ThrowsAsync <ArgumentNullException>(() => client.Delete(null)); }
public async Task EnsuresNoNullEmails() { var client = new UserEmailsClient(Substitute.For <IApiConnection>()); await Assert.ThrowsAsync <ArgumentException>(() => client.Delete("*****@*****.**", null)); }
public void EnsuresNonNullArgument() { var client = new UserEmailsClient(Substitute.For <IApiConnection>()); Assert.Throws <ArgumentNullException>(() => client.Delete(null)); }
public async Task EnsuresNoNullEmails() { var client = new UserEmailsClient(Substitute.For<IApiConnection>()); await Assert.ThrowsAsync<ArgumentException>(() => client.Delete("*****@*****.**", null)); }
public async Task EnsuresNonNullArgument() { var client = new UserEmailsClient(Substitute.For<IApiConnection>()); await Assert.ThrowsAsync<ArgumentNullException>(() => client.Delete(null)); }
public void EnsuresNonNullArgument() { var client = new UserEmailsClient(Substitute.For<IApiConnection>()); Assert.Throws<ArgumentNullException>(() => client.Delete(null)); }