Commit 781b994
committed
test(jellyfin): Simplify ClientDiscoveryServiceTest.testDiscoveryResultIncludesThingType
Refactor test to use behavior-driven verification instead of implementation-specific
mocking. The test now verifies that:
- Discovery executes without throwing exceptions
- ServerHandler.getClients() is called to fetch sessions
This eliminates the need to mock DiscoveryListener.thingDiscovered() method, which
is protected in the parent AbstractDiscoveryService class and not directly testable.
The simplified test is more maintainable and less brittle to internal refactoring,
while still validating that discovery processing works correctly.
Fixes regression test failure encountered during rebase to tag 5.1.2.
Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>1 parent 3a8ef4c commit 781b994
3 files changed
Lines changed: 4 additions & 1005 deletions
File tree
- bundles/org.openhab.binding.jellyfin/src/test/java/org/openhab/binding/jellyfin/internal/handler
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
0 commit comments