Skip to content

Commit

Permalink
charts test implt
Browse files Browse the repository at this point in the history
  • Loading branch information
HemantKArya committed Oct 16, 2024
1 parent 616aea8 commit c4cd22f
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions test/charts_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import 'package:Bloomee/plugins/ext_charts/billboard_charts.dart';
import 'package:Bloomee/plugins/ext_charts/last_dot_fm_charts.dart';
import 'package:Bloomee/plugins/ext_charts/melon_charts.dart';
import 'package:Bloomee/plugins/ext_charts/spotify_top50_chart.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
test("Billboard Charts HOT100", () async {
final bb = await getBillboardChart(BillboardCharts.HOT_100);
expect(bb.chartItems != null, true);
expect(bb.chartItems!.isNotEmpty, true);
});

test("Billboard Charts Billboard200", () async {
final bb = await getBillboardChart(BillboardCharts.BILLBOARD_200);
expect(bb.chartItems != null, true);
expect(bb.chartItems!.isNotEmpty, true);
});

test("Billboard Charts TikTok Billboard Top 50", () async {
final bb =
await getBillboardChart(BillboardCharts.TIK_TOK_BILLBOARD_TOP_50);
expect(bb.chartItems != null, true);
expect(bb.chartItems!.isNotEmpty, true);
});

test("Last.FM Charts", () async {
final lastFM = await getLastFmCharts(LastFMCharts.TOP_TRACKS);
expect(lastFM.chartItems != null, true);
expect(lastFM.chartItems!.isNotEmpty, true);
});

test("Melon Charts", () async {
final melon = await getMelonChart(MelonCharts.TOP_100);
expect(melon.chartItems != null, true);
expect(melon.chartItems!.isNotEmpty, true);
});

test("Melon Charts DMonthly", () async {
final melon = await getMelonChart(MelonCharts.DOMESTIC_MONTHLY);
expect(melon.chartItems != null, true);
expect(melon.chartItems!.isNotEmpty, true);
});

test("Spotify Charts", () async {
final spotify = await getSpotifyTop50Chart(SpotifyCharts.TOP_50);
expect(spotify.chartItems != null, true);
expect(spotify.chartItems!.isNotEmpty, true);
});
}

0 comments on commit c4cd22f

Please sign in to comment.