Search in sources :

Example 1 with MockCurrentConfig

use of com.kickstarter.libs.MockCurrentConfig in project android-oss by kickstarter.

the class KSCurrencyTest method createKSCurrency.

private static KSCurrency createKSCurrency(final String countryCode) {
    final Config config = ConfigFactory.config().toBuilder().countryCode(countryCode).build();
    final CurrentConfigType currentConfig = new MockCurrentConfig();
    currentConfig.config(config);
    return new KSCurrency(currentConfig);
}
Also used : MockCurrentConfig(com.kickstarter.libs.MockCurrentConfig) KSCurrency(com.kickstarter.libs.KSCurrency) MockCurrentConfig(com.kickstarter.libs.MockCurrentConfig) Config(com.kickstarter.libs.Config) CurrentConfigType(com.kickstarter.libs.CurrentConfigType)

Example 2 with MockCurrentConfig

use of com.kickstarter.libs.MockCurrentConfig in project android-oss by kickstarter.

the class KSRobolectricTestCase method setUp.

@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    final MockTrackingClient testTrackingClient = new MockTrackingClient();
    koalaTest = new TestSubscriber<>();
    testTrackingClient.eventNames.subscribe(koalaTest);
    environment = application().component().environment().toBuilder().apiClient(new MockApiClient()).currentConfig(new MockCurrentConfig()).webClient(new MockWebClient()).koala(new Koala(testTrackingClient)).build();
}
Also used : MockCurrentConfig(com.kickstarter.libs.MockCurrentConfig) MockWebClient(com.kickstarter.services.MockWebClient) MockApiClient(com.kickstarter.services.MockApiClient) Koala(com.kickstarter.libs.Koala) MockTrackingClient(com.kickstarter.libs.MockTrackingClient) Before(org.junit.Before)

Aggregations

MockCurrentConfig (com.kickstarter.libs.MockCurrentConfig)2 Config (com.kickstarter.libs.Config)1 CurrentConfigType (com.kickstarter.libs.CurrentConfigType)1 KSCurrency (com.kickstarter.libs.KSCurrency)1 Koala (com.kickstarter.libs.Koala)1 MockTrackingClient (com.kickstarter.libs.MockTrackingClient)1 MockApiClient (com.kickstarter.services.MockApiClient)1 MockWebClient (com.kickstarter.services.MockWebClient)1 Before (org.junit.Before)1