Skip to content

Use hamcrest #11

@leonardofl

Description

@leonardofl

There is no problem in the line

assertTrue(actualStringSplits.containsAll(Arrays.asList(expectedStringSplit1, expectedStringSplit2)));

But I believe you would enjoy to learn how to use Hamcrest and write something like:

assertThat(actualStringSplits, containsAll(Arrays.asList(expectedStringSplit1, expectedStringSplit2)));

Advantage: when the test fails, the message is much more descriptive about what went wrong.

Metadata

Metadata

Assignees

Labels

doingWorking on taskenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions