eclipse / jnosql

Eclipse JNoSQL is a framework which has the goal to help Java developers to create Jakarta EE applications with NoSQL.
Other
229 stars 72 forks source link

Test improvements #369

Closed eliasnogueira closed 1 year ago

eliasnogueira commented 1 year ago

Test improvements

This PR adds test improvements in the jnosql-communication-core module.

Added

Changed

Removed

Review before the merge

The following classes have //TODO comments and must be discussed before this PR can be merged.

ByteValueReaderTest

The test shouldConvert() is using the valueReader method that, previously, was using the Integer.class to verify the possible conversions, but it was causing a CastException. It was changed to Byte.class because it will return the converted value based on a byte value.

I believe the Byte is the correct class, but I need your guys input by

LocalDateTimeReaderTest

When the assertions were changed by the soft ones I had to change the parameters, as assertions methods are comparing always the actual vs expected. Before we had expected vs actual. Without the inversion, this test was throwing NullPointerExceptions

We need just a quick look at the shouldConvert() test to see if the actual objects make sense.

OffsetDateTimeReaderTest

The test shouldConvert() was using the OffSetDate class to read, but I believe the correct one should be the OffSetDateTime class, which also makes sense in the context of this test.

Can you guys double-check and see if the OffSetDateTime class is the correct one to use?

genie-jnosql commented 1 year ago

Can one of the admins verify this patch?

otaviojava commented 1 year ago

Amazing, there is a lot of improvement :)

eliasnogueira commented 1 year ago

@otaviojava what about the open questions in the PR description?

otaviojava commented 1 year ago

@eliasnogueira the PR is good enough, IMHO: let's merge it and open issues to solve on different PRs.

otaviojava commented 1 year ago

@eliasnogueira could you solve the pom.xml conflict?

eliasnogueira commented 1 year ago

@eliasnogueira could you solve the pom.xml conflict?

done :-)

eliasnogueira commented 1 year ago

@otaviojava I will go through the issues found during the build and adjust this PR