Skip to content

Commit

Permalink
fix study view service test
Browse files Browse the repository at this point in the history
  • Loading branch information
qlu-cls committed Oct 6, 2023
1 parent 5f1ab78 commit 4b9d713
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
@RunWith(MockitoJUnitRunner.class)
public class StudyViewServiceImplTest extends BaseServiceImplTest {

@Spy
@InjectMocks
private StudyViewServiceImpl studyViewService;
@Mock
Expand Down Expand Up @@ -251,9 +252,8 @@ public void getMutationCountsByGeneSpecific() {
genomicDataCounts.add(genomicDataCount2);
genomicDataCountItem.setCounts(genomicDataCounts);

Mockito.when(studyViewService.getMutationTypeCountsByGeneSpecific(
anyList(), anyList(), anyList()
)).thenReturn(Collections.singletonList(genomicDataCountItem));
Mockito.doReturn(Collections.singletonList(genomicDataCountItem))
.when(studyViewService).getMutationTypeCountsByGeneSpecific(anyList(), anyList(), anyList());

List<GenomicDataCountItem> result = studyViewService.getMutationCountsByGeneSpecific(
studyIds, sampleIds, genomicDataFilters, alterationFilter, "SUMMARY");
Expand All @@ -263,7 +263,7 @@ public void getMutationCountsByGeneSpecific() {
result = studyViewService.getMutationCountsByGeneSpecific(
studyIds, sampleIds, genomicDataFilters, alterationFilter, "DETAILED");
Assert.assertEquals(1, result.size());
Assert.assertTrue(3 <= result.get(0).getCounts().size());
Assert.assertEquals(4, result.get(0).getCounts().size());
}

@Test
Expand Down

0 comments on commit 4b9d713

Please sign in to comment.