Ran
|
Jobs
1
|
Files
11
|
Run time
1s
|
Badge
Embed ▾
README BADGES
|
travis-ci
CSV-252: Clean up assertions using assertThrows As a followup to commit e2f0a4d8a that introduced JUnit Jupiter to the project, this patch leverages the new Assertions#assertThrows method to clean up tests for expected exceptions. Instead of the somewhat clunky structure common in JUnit 4 tests: ``` try { someMethod(); fail("SomeException should be thrown"); } catch (SomeException e) { // Expected... // Possibly some assertion on e } ``` JUnit Jupiter allows the following elegant syntax: ``` SomeException e = assertThrows(SomeException.class, () -> someMethod()); // Possibly some assertions on e ```
933 of 1004 relevant lines covered (92.93%)
0.93 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
2 | 288.2 | 11 |
92.93 |
Travis Job 288.2 |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|