-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestRunner.java
More file actions
29 lines (26 loc) · 931 Bytes
/
TestRunner.java
File metadata and controls
29 lines (26 loc) · 931 Bytes
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
package decisiontree;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
/*
* You do not need to edit this file.
*
* This class is used to run all of your JUnit tests, which should be written in the
* the MyID3Test.java file. If any of your tests fail, a failure
* message will be printed out, and if they all pass, "all tests passed!" will be printed.
*
* One way of running your tests is to right-click on this class (TestRunner.java) in the
* Eclipse package explorer and select Run As -> Java Application.
*
*/
public class TestRunner {
public static void main(String[] args) {
Result result = JUnitCore.runClasses(MyID3Test.class);
for (Failure failure : result.getFailures()) {
System.out.println(failure.toString());
}
if(result.wasSuccessful()) {
System.out.println("all tests passed!");
}
}
}