public async Task EnsuresArgumentsNotNull() { var connection = Substitute.For<IApiConnection>(); var client = new EventsClient(connection); await Assert.ThrowsAsync<ArgumentNullException>(() => client.GetAllUserReceived(null)); await Assert.ThrowsAsync<ArgumentException>(() => client.GetAllUserReceived("")); }
public void RequestsCorrectUrl() { var connection = Substitute.For<IApiConnection>(); var client = new EventsClient(connection); client.GetAllUserReceived("fake"); connection.Received().GetAll<Activity>(Arg.Is<Uri>(u => u.ToString() == "users/fake/received_events")); }