public void InvalidId_ThrowsHttpRequestException() { var response = SteamApiClient.GetFriendslistAsync(0) .Result; Assert.False(response.Successful); Assert.NotNull(response.ThrownException); Assert.Null(response.Contents); Assert.True(response.ThrownException is HttpRequestException); }
public void ValidId_ReturnsUsersFriendslist(ulong id64) { var response = SteamApiClient.GetFriendslistAsync(id64) .Result; SleepAfterSendingRequest(); Assert.NotNull(response); Assert.NotEmpty(response.Contents); Assert.All(response.Contents, r => Assert.True(r.Id64 != 0)); }
public void PrivateProfileId_ThrowsPrivateResponseException() { var response = SteamApiClient.GetFriendslistAsync(76561198089305067) .Result; SleepAfterSendingRequest(); Assert.False(response.Successful); Assert.NotNull(response.ThrownException); Assert.Null(response.Contents); Assert.True(response.ThrownException is ApiPrivateContentException); }