Skip to content

Commit

Permalink
renamed from numSolved to score
Browse files Browse the repository at this point in the history
  • Loading branch information
AyadLaouissi committed Mar 6, 2024
1 parent 1ef3e74 commit d64b9ad
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void main() {
LeaderboardPlayer(
id: 'id',
initials: 'TST',
numSolved: 10,
score: 10,
),
isNotNull,
);
Expand All @@ -19,7 +19,7 @@ void main() {
final leaderboardPlayer = LeaderboardPlayer(
id: 'id',
initials: 'TST',
numSolved: 20,
score: 20,
);

test('toJson returns the instance as json', () {
Expand All @@ -28,7 +28,7 @@ void main() {
equals({
'id': 'id',
'initials': 'TST',
'numSolved': 20,
'score': 20,
}),
);
});
Expand All @@ -38,23 +38,23 @@ void main() {
LeaderboardPlayer.fromJson(const {
'id': 'id',
'initials': 'TST',
'numSolved': 20,
'score': 20,
}),
equals(leaderboardPlayer),
);
});

test('supports equality', () {
expect(
LeaderboardPlayer(id: '', initials: 'TST', numSolved: 20),
equals(LeaderboardPlayer(id: '', initials: 'TST', numSolved: 20)),
LeaderboardPlayer(id: '', initials: 'TST', score: 20),
equals(LeaderboardPlayer(id: '', initials: 'TST', score: 20)),
);

expect(
LeaderboardPlayer(
id: '',
initials: 'TST',
numSolved: 20,
score: 20,
),
isNot(
equals(leaderboardPlayer),
Expand All @@ -65,7 +65,7 @@ void main() {
LeaderboardPlayer(
id: 'id',
initials: 'WOW',
numSolved: 20,
score: 20,
),
isNot(
equals(leaderboardPlayer),
Expand Down

0 comments on commit d64b9ad

Please sign in to comment.