-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathout1.txt
295 lines (220 loc) · 5.47 KB
/
out1.txt
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# FORMAT per a fer el test: #
# nomMetode, valorArgument1, valorArgument2, valorArgumentN #
# Admet String's, tipus de dades primitius i dates (java.util.Date) #
# en format dd-MM-yyyy HH:mm:ss #
# No suporta metodes homonims amb el mateix nombre de parametres #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# EP2 test
# ERROR
users()
ERROR: There are no users
addUser(000000A, Joan, Lopez)
void
addUser(111111A, Philip, McCarthy)
void
addUser(222222B, Jooooooohn, Petit)
void
addUser(333333C, Peter, Esteban)
void
addUser(444444D, Xavi, Casajoana)
void
addUser(555555E, Pol, Izquierdo)
void
addUser(666666X, Jordi, Salvat)
void
users()
id: 000000A name: Joan surname: Lopez
id: 111111A name: Philip surname: McCarthy
id: 222222B name: Jooooooohn surname: Petit
id: 333333C name: Peter surname: Esteban
id: 444444D name: Xavi surname: Casajoana
id: 555555E name: Pol surname: Izquierdo
id: 666666X name: Jordi surname: Salvat
# ERROR
movies()
ERROR: There are no movies
addMovie(M2, Star Wars: Episode V - The Empire Strikes Back, 124, Irvin Kershner)
void
addMovie(M4, Superman, 143, Richard Donner)
void
addMovie(M5, Gone with the Wind, 221, Victor Fleming)
void
addMovie(M3, Star Wars: Episode VI - Return of the Jedi, 124, Richard Marquand)
void
addMovie(M1, Star Wars: Episode IV - A New Hope, 121, George Lucas)
void
movies()
idMovie:M2
title: Star Wars: Episode V - The Empire Strikes Back
director: Irvin Kershner
duration: 124
views: 0
idMovie:M4
title: Superman
director: Richard Donner
duration: 143
views: 0
idMovie:M5
title: Gone with the Wind
director: Victor Fleming
duration: 221
views: 0
idMovie:M3
title: Star Wars: Episode VI - Return of the Jedi
director: Richard Marquand
duration: 124
views: 0
idMovie:M1
title: Star Wars: Episode IV - A New Hope
director: George Lucas
duration: 121
views: 0
watchMovie(000000A, M5)
void
# ERROR
getUser(XXXXXX)
ERROR: User not found
getUser(000000A)
id: 000000A name: Joan surname: Lopez
watching movie:
idMovie:M5
title: Gone with the Wind
director: Victor Fleming
duration: 221
views: 0
watchMovie(000000A, M1)
void
getUser(000000A)
id: 000000A name: Joan surname: Lopez
watching movie:
idMovie:M1
title: Star Wars: Episode IV - A New Hope
director: George Lucas
duration: 121
views: 0
watchMovie(111111A, M2)
void
getUser(111111A)
id: 111111A name: Philip surname: McCarthy
watching movie:
idMovie:M2
title: Star Wars: Episode V - The Empire Strikes Back
director: Irvin Kershner
duration: 124
views: 0
watchMovie(222222B, M2)
void
watchMovie(555555E, M5)
void
watchMovie(555555E, M2)
void
getUser(555555E)
id: 555555E name: Pol surname: Izquierdo
watching movie:
idMovie:M2
title: Star Wars: Episode V - The Empire Strikes Back
director: Irvin Kershner
duration: 124
views: 0
watchMovie(666666X, M4)
void
endMovie(000000A, 26-10-2017 20:00:00)
void
endMovie(111111A, 26-10-2017 20:00:00)
void
endMovie(222222B, 26-10-2017 20:00:00)
void
endMovie(555555E, 26-10-2017 20:00:00)
void
endMovie(666666X, 27-10-2017 10:00:00)
void
watchMovie(111111A, M4)
void
endMovie(111111A, 01-10-2017 10:00:00)
void
# Expected: M2: 3, M4: 2, M1: 1
topMovies()
idMovie:M2
title: Star Wars: Episode V - The Empire Strikes Back
director: Irvin Kershner
duration: 124
views: 3
idMovie:M4
title: Superman
director: Richard Donner
duration: 143
views: 2
idMovie:M1
title: Star Wars: Episode IV - A New Hope
director: George Lucas
duration: 121
views: 1
# ERROR
pauseMovie(333333C, 50)
ERROR: User isn't watching any movie
watchMovie(333333C, M2)
void
pauseMovie(333333C, 50)
void
getUser(333333C)
id: 333333C name: Peter surname: Esteban
paused movie:
movie: Star Wars: Episode V - The Empire Strikes Back, minute: 50
# ERROR
pauseMovie(333333C, 60)
ERROR: User isn't watching any movie
ERROR: El metode resumeMovie(333333C) no existeix
getUser(333333C)
id: 333333C name: Peter surname: Esteban
paused movie:
movie: Star Wars: Episode V - The Empire Strikes Back, minute: 50
# ERROR
pauseMovie(333333C, 200)
ERROR: User isn't watching any movie
pauseMovie(333333C, 60)
ERROR: User isn't watching any movie
getUser(333333C)
id: 333333C name: Peter surname: Esteban
paused movie:
movie: Star Wars: Episode V - The Empire Strikes Back, minute: 50
# ERROR
endMovie(333333C, 31-10-2017 10:00:00)
ERROR: User isn't watching any movie
ERROR: El metode resumeMovie(333333C) no existeix
getUser(333333C)
id: 333333C name: Peter surname: Esteban
paused movie:
movie: Star Wars: Episode V - The Empire Strikes Back, minute: 50
endMovie(333333C, 31-10-2017 10:00:00)
ERROR: User isn't watching any movie
getUser(333333C)
id: 333333C name: Peter surname: Esteban
paused movie:
movie: Star Wars: Episode V - The Empire Strikes Back, minute: 50
# Expected: M2: 4, M4: 2, M1: 1
topMovies()
idMovie:M2
title: Star Wars: Episode V - The Empire Strikes Back
director: Irvin Kershner
duration: 124
views: 3
idMovie:M4
title: Superman
director: Richard Donner
duration: 143
views: 2
idMovie:M1
title: Star Wars: Episode IV - A New Hope
director: George Lucas
duration: 121
views: 1
watchMovie(111111A, M5)
void
endMovie(111111A, 07-10-2017 10:00:00)
void
# Expected M4, M5, M2
getUserWatchedMovies(111111A)
M4 Superman Sun Oct 01 10:00:00 CEST 2017
M5 Gone with the Wind Sat Oct 07 10:00:00 CEST 2017
M2 Star Wars: Episode V - The Empire Strikes Back Thu Oct 26 20:00:00 CEST 2017