-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestCaseClass.template
40 lines (35 loc) · 1.25 KB
/
TestCaseClass.template
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
package %package%;
import net.egork.chelper.task.Test;
import net.egork.chelper.tester.TestProvider;
import net.egork.chelper.tester.TestCase;
import %OutputClassFQN%;
import java.util.*;
import java.io.StringWriter;
public class %TestCaseClass% {
@TestCase
public Collection<Test> loadTests() {
List<Test> tests = new ArrayList<Test>();
Random random = new Random(239);
int testCount = 0;
for (int testNumber = 0; testNumber < testCount; testNumber++) {
StringWriter sw = new StringWriter();
%OutputClass% out = new %OutputClass%(sw);
tests.add(new Test(sw.toString()));
}
return tests;
}
@TestCase
public Collection<Test> accuracyTests() {
List<Test> tests = new ArrayList<Test>();
Random random = new Random(239);
int testCount = 0;
for (int testNumber = 0; testNumber < testCount; testNumber++) {
StringWriter sw = new StringWriter();
%OutputClass% out = new %OutputClass%(sw);
StringWriter swAnswer = new StringWriter();
%OutputClass% outAnswer = new %OutputClass%(swAnswer);
tests.add(new Test(sw.toString(), swAnswer.toString()));
}
return tests;
}
}