Skip to content

Commit

Permalink
test: updated models
Browse files Browse the repository at this point in the history
  • Loading branch information
jsgalarraga committed Mar 4, 2024
1 parent b8d9088 commit 998609e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions api/packages/game_domain/test/src/models/board_section_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ void main() {
final boardSection = BoardSection(
id: 'id',
position: Point(1, 2),
width: 3,
height: 4,
size: 200,
words: [
Word(
id: 'id',
Expand All @@ -24,6 +23,7 @@ void main() {
solvedTimestamp: 1234,
),
],
borderWords: [],
);
final json = boardSection.toJson();

Expand All @@ -32,8 +32,7 @@ void main() {
equals({
'id': 'id',
'position': {'x': 1, 'y': 2},
'width': 3,
'height': 4,
'size': 200,
'words': [
{
'id': 'id',
Expand All @@ -46,6 +45,7 @@ void main() {
'solvedTimestamp': 1234,
},
],
'borderWords': <Map<String, dynamic>>[],
}),
);
});
Expand All @@ -54,8 +54,7 @@ void main() {
final json = {
'id': 'id',
'position': {'x': 1, 'y': 2},
'width': 3,
'height': 4,
'size': 200,
'words': [
{
'id': 'id',
Expand All @@ -68,6 +67,7 @@ void main() {
'solvedTimestamp': 1234,
},
],
'borderWords': <Map<String, dynamic>>[],
};
final boardSection = BoardSection.fromJson(json);
expect(
Expand All @@ -76,8 +76,7 @@ void main() {
BoardSection(
id: 'id',
position: Point(1, 2),
width: 3,
height: 4,
size: 200,
words: [
Word(
id: 'id',
Expand All @@ -90,6 +89,7 @@ void main() {
solvedTimestamp: 1234,
),
],
borderWords: [],
),
),
);
Expand All @@ -99,16 +99,16 @@ void main() {
final firstBoardSection = BoardSection(
id: 'id',
position: Point(1, 2),
width: 3,
height: 4,
size: 300,
words: [],
borderWords: [],
);
final secondBoardSection = BoardSection(
id: 'id',
position: Point(1, 2),
width: 3,
height: 4,
size: 300,
words: [],
borderWords: [],
);

expect(firstBoardSection, equals(secondBoardSection));
Expand Down

0 comments on commit 998609e

Please sign in to comment.