Skip to content

Commit

Permalink
improved coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysKisliak committed Sep 2, 2021
1 parent ffc0df5 commit 35d9586
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 0 deletions.
Binary file added .gradle/6.7/executionHistory/executionHistory.lock
Binary file not shown.
Binary file added .gradle/6.7/fileChanges/last-build.bin
Binary file not shown.
Binary file added .gradle/6.7/fileHashes/fileHashes.lock
Binary file not shown.
Empty file added .gradle/6.7/gc.properties
Empty file.
Binary file added .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 2 additions & 0 deletions .gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Thu Sep 02 15:09:41 EEST 2021
gradle.version=6.7
Binary file added .gradle/checksums/checksums.lock
Binary file not shown.
Empty file.
Empty file added .gradle/vcs-1/gc.properties
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,22 @@ void getFirstPageData() {
assertEquals(userPointsAndAllBagsDtoExpected.getPoints(), userPointsAndAllBagsDtoActual.getPoints());
}

@Test
void getFirstPageDataTest() {
UserPointsAndAllBagsDtoTest userPointsAndAllBagsDtoExpected =
new UserPointsAndAllBagsDtoTest(new ArrayList<BagTranslationDto>(), 2l, 600);

User user = ModelUtils.getUserWithLastLocation();
user.setCurrentPoints(600);
when(userRepository.findByUuid("35467585763t4sfgchjfuyetf")).thenReturn(user);

UserPointsAndAllBagsDtoTest userPointsAndAllBagsDtoActual =
ubsService.getFirstPageDataTest("35467585763t4sfgchjfuyetf");

assertEquals(userPointsAndAllBagsDtoExpected.getBags(), userPointsAndAllBagsDtoActual.getBags());
assertEquals(userPointsAndAllBagsDtoExpected.getPoints(), userPointsAndAllBagsDtoActual.getPoints());
}

@Test
void testSaveToDB() throws InvocationTargetException, IllegalAccessException {

Expand Down Expand Up @@ -666,4 +682,5 @@ void testSetNewLastOrderLocation() {

assertEquals(user.getLastLocation(), lastLocation);
}

}

0 comments on commit 35d9586

Please sign in to comment.