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

Added Junit Tests for LocalCache Class #3014

Merged
merged 1 commit into from
Sep 2, 2020
Merged

Conversation

sonja-ct
Copy link
Contributor

@sonja-ct sonja-ct commented Jul 6, 2020

Added Junit Tests for LocalCache Class

Signed-off-by: Sonja sonja.matic@comtrade.com

Related Issue
/
Description of the solution adopted
/

Screenshots
/

Any side note on the changes made
/

@codecov
Copy link

codecov bot commented Jul 6, 2020

Codecov Report

Merging #3014 into develop will increase coverage by 0.10%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3014      +/-   ##
=============================================
+ Coverage      58.35%   58.46%   +0.10%     
  Complexity      2601     2601              
=============================================
  Files           1070     1070              
  Lines          22863    22863              
  Branches        2023     2023              
=============================================
+ Hits           13341    13366      +25     
+ Misses          8591     8560      -31     
- Partials         931      937       +6     
Impacted Files Coverage Δ Complexity Δ
.../engine/jbatch/exception/JobResumingException.java 0.00% <0.00%> (-50.00%) 0.00% <0.00%> (-1.00%)
...ob/engine/jbatch/exception/JobEngineException.java 33.33% <0.00%> (-33.34%) 1.00% <0.00%> (-1.00%)
...lugin/authentication/AdminAuthenticationLogic.java 69.23% <0.00%> (-7.70%) 0.00% <0.00%> (ø%)
...ce/management/commons/call/DeviceCallExecutor.java 62.79% <0.00%> (-4.66%) 0.00% <0.00%> (ø%)
.../jbatch/persistence/JPAPersistenceManagerImpl.java 30.56% <0.00%> (-3.63%) 30.00% <0.00%> (-1.00%)
.../DeviceManagementOperationRegistryServiceImpl.java 66.07% <0.00%> (-3.58%) 12.00% <0.00%> (-2.00%)
...pse/kapua/commons/service/internal/ServiceDAO.java 74.21% <0.00%> (-0.32%) 0.00% <0.00%> (ø%)
...apua/job/engine/jbatch/JobEngineServiceJbatch.java 51.85% <0.00%> (ø) 9.00% <0.00%> (ø%)
...plugin/authentication/UserAuthenticationLogic.java 76.78% <0.00%> (+1.78%) 0.00% <0.00%> (ø%)
...obDeviceManagementOperationManagerServiceImpl.java 79.26% <0.00%> (+6.09%) 14.00% <0.00%> (+1.00%)
... and 7 more

Copy link
Contributor

@LeoNerdoG LeoNerdoG left a comment

Choose a reason for hiding this comment

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

hey @Coduz,
I have checked this PR and it looks OK - can you please check it when you have time and merge?

Copy link
Contributor

@Coduz Coduz left a comment

Choose a reason for hiding this comment

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

I made some comments on things which I have already commented on #3008.
All other things are good :)

for (int expireAfter : expireAfterList) {
for (Object defaultValue : defaultValueList) {
LocalCache<Object, Object> localCache = new LocalCache<>(sizeMax, expireAfter, defaultValue);
assertNotNull(localCache);
Copy link
Contributor

Choose a reason for hiding this comment

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

LocalCache<Object, Object> localCache = new LocalCache<>(sizeMax, expireAfter, defaultValue);
assertNotNull(localCache);
assertEquals("Expected and actual values should be the same.", defaultValue, localCache.get(defaultValueList));
assertThat("LocalCache object expected.", localCache, IsInstanceOf.instanceOf(LocalCache.class));
Copy link
Contributor

Choose a reason for hiding this comment

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

for (int sizeMax : sizeMaxList) {
for (Object defaultValue : defaultValueList) {
LocalCache<Object, Object> localCache = new LocalCache<>(sizeMax, defaultValue);
assertNotNull("Null not expected.", localCache);
Copy link
Contributor

Choose a reason for hiding this comment

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

LocalCache<Object, Object> localCache = new LocalCache<>(sizeMax, defaultValue);
assertNotNull("Null not expected.", localCache);
assertEquals("Expected and actual values should be the same.", defaultValue, localCache.get(defaultValueList));
assertThat("LocalCache object expected.", localCache, IsInstanceOf.instanceOf(LocalCache.class));
Copy link
Contributor

Choose a reason for hiding this comment

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

@sonja-ct sonja-ct force-pushed the localCache branch 2 times, most recently from da8fd52 to 6971f43 Compare July 29, 2020 10:10
@sonja-ct
Copy link
Contributor Author

Hey @Coduz,
I made all the requested changes, if you can take a look, I hope everything is ok now.
Thanks, Sonja

Signed-off-by: Sonja <sonja.matic@comtrade.com>
@Coduz Coduz merged commit 2642cf6 into eclipse:develop Sep 2, 2020
@sonja-ct sonja-ct deleted the localCache branch September 3, 2020 06:21
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.

3 participants