@@ -40,8 +40,8 @@ class CompilerServiceTests {
40
40
private CompilerService compilerService ;
41
41
42
42
private MultipartFile file = new MockMultipartFile (
43
- "test.txt.c " ,
44
- "test.txt " ,
43
+ "test.java " ,
44
+ "test.java " ,
45
45
null ,
46
46
(byte []) null );
47
47
@@ -132,8 +132,8 @@ void WhenMemoryLimitLessThanMinExecutionMemoryShouldReturnBadRequest() {
132
132
void WhenImageBuildFailShouldThrowContainerBuildException () throws Exception {
133
133
// Given
134
134
MockMultipartFile file = new MockMultipartFile (
135
- "file" ,
136
- "hello.txt " ,
135
+ "file.java " ,
136
+ "hello.java " ,
137
137
MediaType .TEXT_PLAIN_VALUE ,
138
138
"Hello, World!" .getBytes ()
139
139
);
@@ -177,7 +177,7 @@ void WhenImageBuildSucceedShouldReturnAResult() throws Exception {
177
177
178
178
MockMultipartFile file = new MockMultipartFile (
179
179
"file" ,
180
- "hello.txt " ,
180
+ "hello.java " ,
181
181
MediaType .TEXT_PLAIN_VALUE ,
182
182
output .getBytes ()
183
183
);
@@ -231,7 +231,7 @@ void WhenItsACorrectAnswerCompileMethodShouldReturnAcceptedVerdict() throws Exce
231
231
232
232
MockMultipartFile file = new MockMultipartFile (
233
233
"file" ,
234
- "hello.txt " ,
234
+ "hello.java " ,
235
235
MediaType .TEXT_PLAIN_VALUE ,
236
236
output .getBytes ()
237
237
);
@@ -283,14 +283,14 @@ void WhenItsAWrongAnswerCompileMethodShouldReturnWrongAnswerVerdict() throws Exc
283
283
284
284
MockMultipartFile sourceCode = new MockMultipartFile (
285
285
"file" ,
286
- "hello.txt " ,
286
+ "hello.java " ,
287
287
MediaType .TEXT_PLAIN_VALUE ,
288
288
output .getBytes ()
289
289
);
290
290
291
291
MockMultipartFile expectedOutputFile = new MockMultipartFile (
292
292
"file" ,
293
- "hello.txt " ,
293
+ "hello.java " ,
294
294
MediaType .TEXT_PLAIN_VALUE ,
295
295
expectedOutput .getBytes ()
296
296
);
@@ -344,7 +344,7 @@ void WhenTheExecutionTimeExceedTheLimitCompileMethodShouldReturnTimeLimitExceede
344
344
345
345
MockMultipartFile file = new MockMultipartFile (
346
346
"file" ,
347
- "hello.txt " ,
347
+ "hello.java " ,
348
348
MediaType .TEXT_PLAIN_VALUE ,
349
349
output .getBytes ()
350
350
);
@@ -400,7 +400,7 @@ void WhenThereIsARuntimeErrorCompileMethodShouldReturnRunTimeErrorVerdict() thro
400
400
401
401
MockMultipartFile file = new MockMultipartFile (
402
402
"file" ,
403
- "hello.txt " ,
403
+ "hello.java " ,
404
404
MediaType .TEXT_PLAIN_VALUE ,
405
405
output .getBytes ()
406
406
);
@@ -460,7 +460,7 @@ void WhenMemoryLimitExceededCompileMethodShouldReturnOutOfMemoryErrorVerdict() t
460
460
461
461
MockMultipartFile file = new MockMultipartFile (
462
462
"file" ,
463
- "hello.txt " ,
463
+ "hello.java " ,
464
464
MediaType .TEXT_PLAIN_VALUE ,
465
465
output .getBytes ()
466
466
);
@@ -517,7 +517,7 @@ void WhenItIsACompilationErrorCompileMethodShouldReturnCompilationErrorVerdict()
517
517
518
518
MockMultipartFile file = new MockMultipartFile (
519
519
"file" ,
520
- "hello.txt " ,
520
+ "hello.java " ,
521
521
MediaType .TEXT_PLAIN_VALUE ,
522
522
output .getBytes ()
523
523
);
@@ -561,7 +561,7 @@ void shouldThrownContainerFailedDependencyException() throws Exception {
561
561
562
562
MockMultipartFile file = new MockMultipartFile (
563
563
"file" ,
564
- "hello.txt " ,
564
+ "hello.java " ,
565
565
MediaType .TEXT_PLAIN_VALUE ,
566
566
output .getBytes ()
567
567
);
@@ -592,7 +592,7 @@ void defaultCompilerShouldThrowContainerOperationTimeoutException() throws Excep
592
592
593
593
MockMultipartFile file = new MockMultipartFile (
594
594
"file" ,
595
- "hello.txt " ,
595
+ "hello.java " ,
596
596
MediaType .TEXT_PLAIN_VALUE ,
597
597
output .getBytes ()
598
598
);
@@ -621,7 +621,7 @@ void defaultCompilerShouldCleanStderrOutput() {
621
621
622
622
MockMultipartFile file = new MockMultipartFile (
623
623
"file" ,
624
- "hello.txt " ,
624
+ "hello.java " ,
625
625
MediaType .TEXT_PLAIN_VALUE ,
626
626
"output" .getBytes ()
627
627
);
0 commit comments