Commit 6231dac
test: improve coverage for MatchStrategy
This commit adds a new unit test suite, `MatchStrategyTest`, to explicitly
verify the behavior of the `FileMatchCollector` instances produced by
`MatchStrategy.ALL_MATCHES` and `MatchStrategy.ANY_MATCH`. It tests their
core branch logic regarding the termination condition (`searchIsOver()`)
by invoking `acceptFile()` and verifying the boolean return values and the
size of the collected results. These tests strictly utilize standard JUnit 4
APIs and lightweight Mockito stubs for dependency isolation.
Co-authored-by: RoiSoleil <3462260+RoiSoleil@users.noreply.github.com>1 parent aa20bf9 commit 6231dac
1 file changed
Lines changed: 19 additions & 7 deletions
Lines changed: 19 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
| |||
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
35 | 47 | | |
36 | 48 | | |
0 commit comments