-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTestData.ts
More file actions
133 lines (116 loc) · 2.53 KB
/
Copy pathTestData.ts
File metadata and controls
133 lines (116 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
import { MatchWithId, Match } from '../types/Match'
import { Player } from '../types/Player'
import { MatchDescription } from '../types/MatchDescription'
import * as moment from 'moment'
import { UserRow, MatchRow } from '../types/Database'
const NOW_MOMENT = moment('2020-03-25 10:00:00')
export const NOW = NOW_MOMENT.toDate()
export const ONE_MINUTE_AFTER = moment(NOW_MOMENT).add(1, 'minute').toDate()
export const HALF_MINUTE_AFTER = moment(NOW_MOMENT).add(30, 'seconds').toDate()
export const FOOSBALL_DATA = {
name: 'foosball',
description: 'what a game',
}
export const FOOSBALL_ROW = {
Id: '1',
Name: FOOSBALL_DATA.name,
Description: FOOSBALL_DATA.description,
}
export const FOOSBALL_GAME = {
id: 1,
...FOOSBALL_DATA,
}
export const FOOSBALL_MATCH_ROW: MatchRow = {
Id: '2',
Team1Player1Id: 1,
Team1Player1Rating: 1001,
Team1Player2Id: 2,
Team1Player2Rating: 1002,
Team2Player1Id: 3,
Team2Player1Rating: 1003,
Team2Player2Id: 4,
Team2Player2Rating: 1004,
Date: NOW,
WinningTeamRatingChange: 16,
LosingTeamRatingChange: -16,
Team1Score: 1,
Team2Score: 0,
GameId: 1,
}
export const FOOSBALL_MATCH_DESCRIPTION: MatchDescription = {
team1: [ 1 ],
team2: [ 3, 4 ],
team1Score: 1,
team2Score: 0,
}
export const FOOSBALL_MATCH_WITH_ID = new MatchWithId(
2,
[ { id: 1, matchRating: 1001 }, { id: 2, matchRating: 1002 }],
[ { id: 3, matchRating: 1003 }, { id: 4, matchRating: 1004 }],
true,
NOW,
16,
-16,
)
export const TONDA_PLAYER_ROW = {
Id: '3',
Name: 'Tonda',
Rating: '1200',
Active: 'true',
InitialRating: '1000',
}
export const TONDA_PLAYER: Player = {
id: 3,
name: 'Tonda',
rating: 1200,
active: true,
initialRating: 1000,
}
export const RADEK_PLAYER_ROW = {
Id: '4',
Name: 'Radek',
Rating: '1001',
Active: 'true',
InitialRating: '1300',
}
export const RADEK_PLAYER: Player = {
id: 4,
name: 'Radek',
rating: 1001,
active: true,
initialRating: 1300,
}
export const PETR_PLAYER_ROW = {
Id: '4',
Name: 'Petr',
Rating: '1001',
Active: 'true',
InitialRating: '1300',
}
export const PETR_PLAYER: Player = {
id: 5,
name: 'Petr',
rating: 999,
active: true,
initialRating: 1200,
}
export const FOOSBALL_MATCH = new Match(
[ TONDA_PLAYER ],
[ RADEK_PLAYER, PETR_PLAYER],
{ team1Score: 1, team2Score: 0 },
FOOSBALL_MATCH_ROW.Date,
16,
-16,
1,
)
export const TONDA_USER_ROW: UserRow = {
Id: 4,
Name: 'Tonda',
Active: true,
}
export const TONDA_USER = {
id: 4,
name: 'Tonda',
active: true,
}
export const ERROR = 'error'