Skip to content
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

Add unit tests #284

Merged
merged 1 commit into from
Oct 14, 2024
Merged

Add unit tests #284

merged 1 commit into from
Oct 14, 2024

Conversation

Yavor16
Copy link
Contributor

@Yavor16 Yavor16 commented Oct 11, 2024

No description provided.

ParsingException expectedException = new ParsingException(resultException.getCause(), Messages.CANNOT_CONVERT_JSON_STREAM_TO_MAP,
errorMessage, invalidJsonInputStream);
Assertions.assertEquals(expectedException.getMessage(), resultException.getMessage());
ParsingException expectedException = new ParsingException(resultException.getCause(),
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe remove this exception construction and just add a check for equals(Messages.CANNOT...
as everything else seems to be taken from the exception we're checking anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But the messages is different is not done this way.

double testDouble = 45.67;
List<Object> originalList = Arrays.asList("String", testNumber, testDouble);

List<String> castedList = ListUtil.cast(originalList);
Copy link
Contributor

Choose a reason for hiding this comment

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

past tense of 'cast' is 'cast' 😄

}

@Test
void testMergeSafely_withBothMapsNonNull() {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add a the same key to both maps to check if it's overwritten correctly in this test.

Copy link

sonarcloud bot commented Oct 14, 2024

@Yavor16 Yavor16 merged commit e114886 into master Oct 14, 2024
4 checks passed
@Yavor16 Yavor16 deleted the add-unit-tests branch October 14, 2024 13:14
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