@Before
  public void setUp() {
    when(settingsFacade.getPlatformSettings()).thenReturn(motechSettings);
    // required in constructor
    when(settingsFacade.getRawConfig("commcare-configs.json"))
        .thenReturn(new ByteArrayInputStream("{}".getBytes()));

    configService =
        new CommcareConfigServiceImpl(
            settingsFacade,
            commCareAPIHttpClient,
            eventRelay,
            commcareDataForwardingEndpointService);
  }
示例#2
0
 private void prepareSettingsFacade() {
   when(settingsFacade.getPlatformSettings()).thenReturn(platformSettings);
   when(platformSettings.getServerUrl()).thenReturn(SERVER_URL);
   when(platformSettings.getServerHost()).thenReturn(SERVER_URL);
 }