Skip to content

Commit

Permalink
BAH-3407 | Fix. test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
SanoferSameera committed Jan 5, 2024
1 parent 47c92ca commit a19e620
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.bahmni.module.bahmnicore.web.v1_0.search;

import org.bahmni.module.bahmnicore.service.BahmniProgramWorkflowService;
import org.bahmni.module.bahmnicore.web.v1_0.LocaleResolver;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -75,6 +76,8 @@ public class VisitFormsSearchHandlerTest {
private BahmniProgramWorkflowService programWorkflowService;
@Mock
private EpisodeService episodeService;
@Mock
private LocaleResolver localeResolver;

private Patient patient;
Locale locale = new Locale("en");
Expand Down Expand Up @@ -125,6 +128,8 @@ public void setUp() throws Exception {
PowerMockito.when(Context.getConceptService()).thenReturn(conceptService);
concept = createConcept("Vitals", "en");

PowerMockito.when(localeResolver.identifyLocale(any())).thenReturn(locale);

Visit visit = new Visit();
PowerMockito.when(Context.getVisitService()).thenReturn(visitService);
PowerMockito.when(Context.getVisitService().getVisitsByPatient(patient)).thenReturn(Arrays.asList(visit));
Expand Down

0 comments on commit a19e620

Please sign in to comment.