Skip to content

Commit

Permalink
test(model): remove unnecessary variable declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
albertms10 committed Jan 15, 2023
1 parent db8d54e commit 978e908
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
3 changes: 1 addition & 2 deletions test/model/booking/recurring_booking_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ void main() {
're': 1,
'red': '2023-02-04T00:00:00.000Z',
};
final recurringBooking = RecurringBooking.fromJson(rawRecurringBooking);
expect(
recurringBooking,
RecurringBooking.fromJson(rawRecurringBooking),
RecurringBooking(
id: 'booking-id',
startDate: DateTime.utc(2022, 12, 4, 9),
Expand Down
3 changes: 1 addition & 2 deletions test/model/booking/single_booking_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ void main() {
'de': 'Student',
'il': true,
};
final singleBooking = SingleBooking.fromJson(rawSingleBooking);
expect(
singleBooking,
SingleBooking.fromJson(rawSingleBooking),
SingleBooking(
id: 'booking-id',
startDate: DateTime.utc(2022, 12, 4, 9),
Expand Down
3 changes: 1 addition & 2 deletions test/model/cabin/cabin_elements_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ void main() {
't': 1,
};
const pianos = [Piano(brand: 'Yamaha', model: 'C5')];
final cabinElements = CabinElements.fromJson(rawCabinElements);
expect(
cabinElements,
CabinElements.fromJson(rawCabinElements),
CabinElements(pianos: pianos, lecterns: 2, tables: 1),
);
});
Expand Down
3 changes: 1 addition & 2 deletions test/model/cabin/cabin_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ void main() {
'b': <Map<String, dynamic>>[],
'rb': <Map<String, dynamic>>[],
};
final cabin = Cabin.fromJson(rawCabin);
expect(
cabin,
Cabin.fromJson(rawCabin),
Cabin(
id: 'cabin-id',
number: 1,
Expand Down
6 changes: 4 additions & 2 deletions test/model/cabin/piano_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ void main() {
'm': 'C5',
'ie': false,
};
final piano = Piano.fromJson(rawPiano);
expect(piano, const Piano(brand: 'Yamaha', model: 'C5'));
expect(
Piano.fromJson(rawPiano),
const Piano(brand: 'Yamaha', model: 'C5'),
);
});
});

Expand Down
6 changes: 4 additions & 2 deletions test/model/cabin/tokenized_cabin_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ void main() {
const cabinTokens = {
'cabinNumber': '1',
};
final tokenizedCabin = TokenizedCabin.fromTokens(cabinTokens);
expect(tokenizedCabin, const TokenizedCabin(cabinNumber: '1'));
expect(
TokenizedCabin.fromTokens(cabinTokens),
const TokenizedCabin(cabinNumber: '1'),
);
});
});

Expand Down
3 changes: 1 addition & 2 deletions test/model/date/holiday_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ void main() {
'ed': '2022-09-12T00:00:00.000Z',
'k': 0,
};
final holiday = Holiday.fromJson(rawHoliday);
expect(
holiday,
Holiday.fromJson(rawHoliday),
Holiday(
startDate: DateTime.utc(2022, 9, 11),
endDate: DateTime.utc(2022, 9, 12),
Expand Down

0 comments on commit 978e908

Please sign in to comment.