Commit c45130b
test: improve coverage for TestMethodDiviner classes
**What:**
Added unit tests covering the `index == -1` (no match) edge cases in `TestMethodDivinerNoPraefixTest` and `TestMethodDivinerJunit3PraefixTest`.
**Why:**
The previous refactoring from `replaceFirst` to `indexOf` introduced a new `if (index != -1)` branch which was not covered by existing tests, causing the Codecov CI check to fail due to a drop in diff coverage.
**Impact:**
Increases code coverage and ensures that renaming methods correctly fallback when the expected prefix/suffix string does not exist in the target string.
Co-authored-by: RoiSoleil <3462260+RoiSoleil@users.noreply.github.com>1 parent 726caf9 commit c45130b
4 files changed
Lines changed: 18 additions & 0 deletions
File tree
- .jules
- org.moreunit.test/test/org/moreunit/util
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
59 | 66 | | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments