Search in sources :

Example 11 with ConfigProvider

use of io.rx_cache2.ConfigProvider in project RxCache by VictorAlbertos.

the class ProxyTranslatorTest method When_Return_Response_Then_Required_Detail_Response_Is_True.

@Test
public void When_Return_Response_Then_Required_Detail_Response_Is_True() throws NoSuchMethodException {
    Method mockMethod = io.rx_cache2.internal.ProvidersRxCache.class.getDeclaredMethod("getMocksWithDetailResponse", Observable.class);
    ConfigProvider configProvider = proxyTranslatorUT.processMethod(mockMethod, dataMethod);
    assertThat(configProvider.requiredDetailedResponse(), is(true));
}
Also used : ConfigProvider(io.rx_cache2.ConfigProvider) Method(java.lang.reflect.Method) Test(org.junit.Test)

Example 12 with ConfigProvider

use of io.rx_cache2.ConfigProvider in project RxCache by VictorAlbertos.

the class ProxyTranslatorTest method Check_Flowable_Reactive_Type.

@Test
public void Check_Flowable_Reactive_Type() throws NoSuchMethodException {
    Method mockMethod = io.rx_cache2.internal.ProvidersRxCache.class.getDeclaredMethod("getMocksFlowable", Flowable.class);
    ConfigProvider configProvider = proxyTranslatorUT.processMethod(mockMethod, dataMethod);
    assertNotNull(configProvider.getLoaderObservable());
}
Also used : ConfigProvider(io.rx_cache2.ConfigProvider) Method(java.lang.reflect.Method) Test(org.junit.Test)

Example 13 with ConfigProvider

use of io.rx_cache2.ConfigProvider in project RxCache by VictorAlbertos.

the class ProxyTranslatorTest method Check_Single_Reactive_Type.

@Test
public void Check_Single_Reactive_Type() throws NoSuchMethodException {
    Method mockMethod = io.rx_cache2.internal.ProvidersRxCache.class.getDeclaredMethod("getMocksSingle", Single.class);
    ConfigProvider configProvider = proxyTranslatorUT.processMethod(mockMethod, dataMethod);
    assertNotNull(configProvider.getLoaderObservable());
}
Also used : ConfigProvider(io.rx_cache2.ConfigProvider) Method(java.lang.reflect.Method) Test(org.junit.Test)

Aggregations

ConfigProvider (io.rx_cache2.ConfigProvider)12 Method (java.lang.reflect.Method)9 Test (org.junit.Test)9 Observable (io.reactivex.Observable)2 DynamicKey (io.rx_cache2.DynamicKey)2 EvictDynamicKey (io.rx_cache2.EvictDynamicKey)2 EvictProvider (io.rx_cache2.EvictProvider)2 ObservableEmitter (io.reactivex.ObservableEmitter)1 ObservableOnSubscribe (io.reactivex.ObservableOnSubscribe)1 Function (io.reactivex.functions.Function)1 TestObserver (io.reactivex.observers.TestObserver)1 Reply (io.rx_cache2.Reply)1