Skip to content

TIKA-2783: Add unit tests for org.apache.tika.mime.HexCoDec#259

Closed
JohnLBergqvist wants to merge 1 commit intoapache:masterfrom
Diffblue-benchmarks:TIKA-2783
Closed

TIKA-2783: Add unit tests for org.apache.tika.mime.HexCoDec#259
JohnLBergqvist wants to merge 1 commit intoapache:masterfrom
Diffblue-benchmarks:TIKA-2783

Conversation

@JohnLBergqvist
Copy link
Copy Markdown

Hi,

I ran JaCoCo over the tika-core module, and found that the org.apache.tika.mime.HexCoDec class was missing unit test coverage.

I've written some tests for this class, with the help of Diffblue Cover. The majority of the class is now covered as a result of these tests.

Hopefully these tests should help you detect regressions caused by future code changes.

These tests were written by Diffblue Cover.
Copy link
Copy Markdown
Contributor

@kkrugler kkrugler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. A test for thrown exception with odd input array length would be nice, but not required.

@JohnLBergqvist
Copy link
Copy Markdown
Author

@kkrugler Many thanks. The first test in the file has a length of 1, which causes the exception to be thrown.

@JohnLBergqvist JohnLBergqvist changed the title fix for TIKA-2783 contributed by JohnBergqvist [TIKA-2783] Add unit tests for org.apache.tika.mime.HexCoDec Nov 16, 2018
@JohnLBergqvist JohnLBergqvist changed the title [TIKA-2783] Add unit tests for org.apache.tika.mime.HexCoDec TIKA-2783: Add unit tests for org.apache.tika.mime.HexCoDec Nov 21, 2018
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.

2 participants