Skip to content

Commit

Permalink
EPMRPP-89421 || Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
APiankouski committed Jul 15, 2024
1 parent 62a9d24 commit 96f58a0
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

import com.epam.reportportal.model.launch.cluster.ClusterInfoResource;
import com.epam.ta.reportportal.BaseTest;
import com.epam.ta.reportportal.entity.cluster.Cluster;
import java.util.ArrayList;
Expand Down Expand Up @@ -86,6 +87,15 @@ void shouldFindAllByLaunchId() {
clusters.forEach(cluster -> assertEquals(LAUNCH_ID, cluster.getLaunchId()));
}

@Test
void shouldFindAllByLaunchIdWithCount() {
final Pageable pageable = PageRequest.of(0, 3, Sort.by(Sort.Order.by(CRITERIA_ID)));
final Page<ClusterInfoResource> clusters = clusterRepository.findAllByLaunchIdWithCount(LAUNCH_ID, pageable);
assertFalse(clusters.isEmpty());
assertEquals(3, clusters.getContent().size());
clusters.getContent().forEach(cluster -> assertEquals(LAUNCH_ID, cluster.getLaunchId()));
}

@Test
void shouldFindByLaunchId() {

Expand Down

0 comments on commit 96f58a0

Please sign in to comment.