Skip to content

Add unit tests for de.rub.nds.crawler.core.jobs package #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ic0ns
Copy link
Contributor

@ic0ns ic0ns commented Jun 19, 2025

Summary

  • Add comprehensive unit tests for PublishBulkScanJob class
  • Achieve test coverage for the entire de.rub.nds.crawler.core.jobs package

Changes

  • Created PublishBulkScanJobTest with 6 test cases covering:
    • Empty target list handling
    • Exception propagation with JobExecutionException wrapping
    • Null BulkScan ID handling
    • Null persistence provider handling
    • Basic bulk scan metadata setting
    • Error handling for target list provider failures

Notes

  • Tests use manual stubs instead of mocking framework for compatibility
  • Some tests requiring static method mocking are documented for future integration tests
  • All tests pass successfully

ic0ns added 2 commits June 19, 2025 11:36
- Add test cases for empty target list handling
- Add test for exception handling with error propagation
- Add test for null BulkScan ID handling
- Add test for null job data map values
- Add test for bulk scan metadata setting
- Use test stubs instead of mocking framework for compatibility

Note: Tests requiring static method mocking are documented as integration test candidates
- Fix @OverRide annotations on JobDataMap method
- Use proper constructors for BulkScan and ControllerCommandConfig
- Implement all required interface methods correctly
- Fix test assertions to match actual exception behavior
- Add TestScanConfig class for abstract ScanConfig implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant