Removed unnecessary declared attributes
This commit is contained in:
@@ -29,10 +29,10 @@ void main() {
|
||||
);
|
||||
|
||||
withClock(fakeClock, () {
|
||||
testPlayer1 = Player(name: 'Alice', description: '');
|
||||
testPlayer2 = Player(name: 'Bob', description: '');
|
||||
testPlayer3 = Player(name: 'Charlie', description: '');
|
||||
testPlayer4 = Player(name: 'Diana', description: '');
|
||||
testPlayer1 = Player(name: 'Alice');
|
||||
testPlayer2 = Player(name: 'Bob');
|
||||
testPlayer3 = Player(name: 'Charlie');
|
||||
testPlayer4 = Player(name: 'Diana');
|
||||
testGroup1 = Group(
|
||||
name: 'Test Group',
|
||||
description: '',
|
||||
|
||||
@@ -36,11 +36,11 @@ void main() {
|
||||
);
|
||||
|
||||
withClock(fakeClock, () {
|
||||
testPlayer1 = Player(name: 'Alice', description: '');
|
||||
testPlayer2 = Player(name: 'Bob', description: '');
|
||||
testPlayer3 = Player(name: 'Charlie', description: '');
|
||||
testPlayer4 = Player(name: 'Diana', description: '');
|
||||
testPlayer5 = Player(name: 'Eve', description: '');
|
||||
testPlayer1 = Player(name: 'Alice');
|
||||
testPlayer2 = Player(name: 'Bob');
|
||||
testPlayer3 = Player(name: 'Charlie');
|
||||
testPlayer4 = Player(name: 'Diana');
|
||||
testPlayer5 = Player(name: 'Eve');
|
||||
testGroup1 = Group(
|
||||
name: 'Test Group 1',
|
||||
description: '',
|
||||
@@ -62,28 +62,24 @@ void main() {
|
||||
name: 'First Test Match',
|
||||
game: testGame,
|
||||
group: testGroup1,
|
||||
players: [testPlayer4, testPlayer5],
|
||||
notes: '',
|
||||
players: [testPlayer4, testPlayer5]
|
||||
);
|
||||
testMatch2 = Match(
|
||||
name: 'Second Test Match',
|
||||
game: testGame,
|
||||
group: testGroup2,
|
||||
players: [testPlayer1, testPlayer2, testPlayer3],
|
||||
notes: '',
|
||||
players: [testPlayer1, testPlayer2, testPlayer3]
|
||||
);
|
||||
testMatchOnlyPlayers = Match(
|
||||
name: 'Test Match with Players',
|
||||
game: testGame,
|
||||
players: [testPlayer1, testPlayer2, testPlayer3],
|
||||
notes: '',
|
||||
players: [testPlayer1, testPlayer2, testPlayer3]
|
||||
);
|
||||
testMatchOnlyGroup = Match(
|
||||
name: 'Test Match with Group',
|
||||
game: testGame,
|
||||
group: testGroup2,
|
||||
players: testGroup2.members,
|
||||
notes: '',
|
||||
players: testGroup2.members
|
||||
);
|
||||
});
|
||||
await database.playerDao.addPlayersAsList(
|
||||
|
||||
@@ -33,10 +33,10 @@ void main() {
|
||||
);
|
||||
|
||||
withClock(fakeClock, () {
|
||||
testPlayer1 = Player(name: 'Alice', description: '');
|
||||
testPlayer2 = Player(name: 'Bob', description: '');
|
||||
testPlayer3 = Player(name: 'Charlie', description: '');
|
||||
testPlayer4 = Player(name: 'Diana', description: '');
|
||||
testPlayer1 = Player(name: 'Alice');
|
||||
testPlayer2 = Player(name: 'Bob');
|
||||
testPlayer3 = Player(name: 'Charlie');
|
||||
testPlayer4 = Player(name: 'Diana');
|
||||
testTeam1 = Team(name: 'Team Alpha', members: [testPlayer1, testPlayer2]);
|
||||
testTeam2 = Team(name: 'Team Beta', members: [testPlayer3, testPlayer4]);
|
||||
testTeam3 = Team(name: 'Team Gamma', members: [testPlayer1, testPlayer3]);
|
||||
|
||||
@@ -24,10 +24,10 @@ void main() {
|
||||
);
|
||||
|
||||
withClock(fakeClock, () {
|
||||
testPlayer1 = Player(name: 'Test Player', description: '');
|
||||
testPlayer2 = Player(name: 'Second Player', description: '');
|
||||
testPlayer3 = Player(name: 'Charlie', description: '');
|
||||
testPlayer4 = Player(name: 'Diana', description: '');
|
||||
testPlayer1 = Player(name: 'Test Player');
|
||||
testPlayer2 = Player(name: 'Second Player');
|
||||
testPlayer3 = Player(name: 'Charlie');
|
||||
testPlayer4 = Player(name: 'Diana');
|
||||
});
|
||||
});
|
||||
tearDown(() async {
|
||||
@@ -348,7 +348,7 @@ void main() {
|
||||
|
||||
// Verifies that a player with empty string name is stored correctly.
|
||||
test('Player with empty string name is stored correctly', () async {
|
||||
final emptyNamePlayer = Player(name: '', description: '');
|
||||
final emptyNamePlayer = Player(name: '');
|
||||
|
||||
await database.playerDao.addPlayer(player: emptyNamePlayer);
|
||||
|
||||
@@ -361,7 +361,7 @@ void main() {
|
||||
// Verifies that a player with very long name is stored correctly.
|
||||
test('Player with very long name is stored correctly', () async {
|
||||
final longName = 'A' * 1000;
|
||||
final longNamePlayer = Player(name: longName, description: '');
|
||||
final longNamePlayer = Player(name: longName);
|
||||
|
||||
await database.playerDao.addPlayer(player: longNamePlayer);
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ void main() {
|
||||
);
|
||||
|
||||
withClock(fakeClock, () {
|
||||
testPlayer1 = Player(name: 'Alice', description: '');
|
||||
testPlayer2 = Player(name: 'Bob', description: '');
|
||||
testPlayer3 = Player(name: 'Charlie', description: '');
|
||||
testPlayer4 = Player(name: 'Diana', description: '');
|
||||
testPlayer1 = Player(name: 'Alice');
|
||||
testPlayer2 = Player(name: 'Bob');
|
||||
testPlayer3 = Player(name: 'Charlie');
|
||||
testPlayer4 = Player(name: 'Diana');
|
||||
testGroup = Group(
|
||||
name: 'Test Group',
|
||||
description: '',
|
||||
|
||||
@@ -37,12 +37,12 @@ void main() {
|
||||
);
|
||||
|
||||
withClock(fakeClock, () {
|
||||
testPlayer1 = Player(name: 'Alice', description: '');
|
||||
testPlayer2 = Player(name: 'Bob', description: '');
|
||||
testPlayer3 = Player(name: 'Charlie', description: '');
|
||||
testPlayer4 = Player(name: 'Diana', description: '');
|
||||
testPlayer5 = Player(name: 'Eve', description: '');
|
||||
testPlayer6 = Player(name: 'Frank', description: '');
|
||||
testPlayer1 = Player(name: 'Alice');
|
||||
testPlayer2 = Player(name: 'Bob');
|
||||
testPlayer3 = Player(name: 'Charlie');
|
||||
testPlayer4 = Player(name: 'Diana');
|
||||
testPlayer5 = Player(name: 'Eve');
|
||||
testPlayer6 = Player(name: 'Frank');
|
||||
testGroup = Group(
|
||||
name: 'Test Group',
|
||||
description: '',
|
||||
@@ -59,14 +59,12 @@ void main() {
|
||||
name: 'Test Match with Group',
|
||||
game: testGame,
|
||||
players: testGroup.members,
|
||||
group: testGroup,
|
||||
notes: '',
|
||||
group: testGroup
|
||||
);
|
||||
testMatchOnlyPlayers = Match(
|
||||
name: 'Test Match with Players',
|
||||
game: testGame,
|
||||
players: [testPlayer4, testPlayer5, testPlayer6],
|
||||
notes: '',
|
||||
players: [testPlayer4, testPlayer5, testPlayer6]
|
||||
);
|
||||
testTeam1 = Team(name: 'Team Alpha', members: [testPlayer1, testPlayer2]);
|
||||
testTeam2 = Team(name: 'Team Beta', members: [testPlayer3, testPlayer4]);
|
||||
@@ -568,14 +566,12 @@ void main() {
|
||||
final match1 = Match(
|
||||
name: 'Match 1',
|
||||
game: testGame,
|
||||
players: playersList,
|
||||
notes: '',
|
||||
players: playersList
|
||||
);
|
||||
final match2 = Match(
|
||||
name: 'Match 2',
|
||||
game: testGame,
|
||||
players: playersList,
|
||||
notes: '',
|
||||
players: playersList
|
||||
);
|
||||
|
||||
await Future.wait([
|
||||
|
||||
@@ -30,9 +30,9 @@ void main() {
|
||||
);
|
||||
|
||||
withClock(fakeClock, () {
|
||||
testPlayer1 = Player(name: 'Alice', description: '');
|
||||
testPlayer2 = Player(name: 'Bob', description: '');
|
||||
testPlayer3 = Player(name: 'Charlie', description: '');
|
||||
testPlayer1 = Player(name: 'Alice');
|
||||
testPlayer2 = Player(name: 'Bob');
|
||||
testPlayer3 = Player(name: 'Charlie');
|
||||
testGame = Game(
|
||||
name: 'Test Game',
|
||||
ruleset: Ruleset.singleWinner,
|
||||
@@ -44,13 +44,11 @@ void main() {
|
||||
name: 'Test Match 1',
|
||||
game: testGame,
|
||||
players: [testPlayer1, testPlayer2],
|
||||
notes: '',
|
||||
);
|
||||
testMatch2 = Match(
|
||||
name: 'Test Match 2',
|
||||
game: testGame,
|
||||
players: [testPlayer2, testPlayer3],
|
||||
notes: '',
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user