public async Task RequestsCorrectUrl() { var connection = Substitute.For <IApiConnection>(); var client = new ActivityFieldsClient(connection); var options = new ApiOptions { PageSize = 1, PageCount = 1, StartPage = 0, }; await client.GetAll(options); Received.InOrder(async() => { await connection.GetAll <ActivityField>(Arg.Is <Uri>(u => u.ToString() == "activityFields"), options); }); }
public async Task EnsuresNonNullArguments() { var client = new ActivityFieldsClient(Substitute.For <IApiConnection>()); await Assert.ThrowsAsync <ArgumentNullException>(() => client.GetAll(null)); }