diff --git a/packages/app_center_ratings_client/lib/src/ratings_client.dart b/packages/app_center_ratings_client/lib/src/ratings_client.dart index 4e59ced11..5d67efdcb 100644 --- a/packages/app_center_ratings_client/lib/src/ratings_client.dart +++ b/packages/app_center_ratings_client/lib/src/ratings_client.dart @@ -53,12 +53,15 @@ class RatingsClient { await _userClient.delete(request, options: callOptions); } - Future> getChart(Timeframe timeframe, String token, - [int? category]) async { + Future> getChart( + Timeframe timeframe, + String token, [ + int? category, + ]) async { final request = chart_pb.GetChartRequest( - timeframe: timeframe.toDTO(), - category: - category != null ? chart_pb.Category.valueOf(category) : null); + timeframe: timeframe.toDTO(), + category: category != null ? chart_pb.Category.valueOf(category) : null, + ); final callOptions = CallOptions(metadata: {'authorization': 'Bearer $token'}); final grpcResponse = diff --git a/packages/app_center_ratings_client/test/ratings_client_test.dart b/packages/app_center_ratings_client/test/ratings_client_test.dart index 1c083d435..01915ba24 100644 --- a/packages/app_center_ratings_client/test/ratings_client_test.dart +++ b/packages/app_center_ratings_client/test/ratings_client_test.dart @@ -35,12 +35,13 @@ void main() { const timeframe = chart.Timeframe.month; final pbChartList = [ pb_chart.ChartData( - rawRating: 3, - rating: Rating( - snapId: snapId, - totalVotes: Int64(105), - ratingsBand: RatingsBand.NEUTRAL, - )) + rawRating: 3, + rating: Rating( + snapId: snapId, + totalVotes: Int64(105), + ratingsBand: RatingsBand.NEUTRAL, + ), + ), ]; final expectedResponse = [ @@ -61,13 +62,19 @@ void main() { timeframe: pb_chart.Timeframe.TIMEFRAME_MONTH, category: pb_chart.Category.GAMES, ); - when(mockChartClient.getChart( - request, - options: anyNamed('options'), - )).thenAnswer( - (_) => MockResponseFuture(mockResponse)); + when( + mockChartClient.getChart( + request, + options: anyNamed('options'), + ), + ).thenAnswer( + (_) => MockResponseFuture(mockResponse), + ); final response = await ratingsClient.getChart( - timeframe, token, pb_chart.Category.GAMES.value); + timeframe, + token, + pb_chart.Category.GAMES.value, + ); expect( response, equals(expectedResponse),