public async Task SteamCommunityDataClientIsNull_ThrowsArgumentNullException() { // Arrange ISteamCommunityDataClient steamCommunityDataClient = null; var appId = 247080U; // Act -> Assert await Assert.ThrowsAsync <ArgumentNullException>(() => { return(steamCommunityDataClient.GetLeaderboardsAsync(appId)); }); }
/// <summary> /// /// </summary> /// <param name="steamCommunityDataClient"></param> /// <param name="appId"></param> /// <param name="progress"></param> /// <param name="cancellationToken"></param> /// <returns></returns> public static Task <LeaderboardsEnvelope> GetLeaderboardsAsync( this ISteamCommunityDataClient steamCommunityDataClient, uint appId, IProgress <long> progress = default, CancellationToken cancellationToken = default) { if (steamCommunityDataClient == null) { throw new ArgumentNullException(nameof(steamCommunityDataClient)); } return(steamCommunityDataClient.GetLeaderboardsAsync(appId.ToString(), progress, cancellationToken)); }