forked from stleary/JSON-Java-unit-test
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestRunner.java
More file actions
Latest commit
19 lines (17 loc) · 584 Bytes
/
Copy pathTestRunner.java
File metadata and controls
19 lines (17 loc) · 584 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
packageorg.json.junit;
importorg.junit.runner.JUnitCore;
importorg.junit.runner.Result;
importorg.junit.runner.notification.Failure;
/**
* Invoke this class main method if you want to run unit tests from the
* command line. If successful, will print "true" to stdout.
*/
publicclassTestRunner {
publicstaticvoidmain(String[] args) {
Resultresult = JUnitCore.runClasses(JunitTestSuite.class);
for (Failurefailure : result.getFailures()) {
System.out.println(failure.toString());
}
System.out.println(result.wasSuccessful());
}
}