Search in sources :

Example 6 with EvictProvider

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

the class ProxyTranslatorTest method When_Multiple_Evict_Throw_Exception.

@Test(expected = IllegalArgumentException.class)
public void When_Multiple_Evict_Throw_Exception() throws NoSuchMethodException {
    Method mockMethod = io.rx_cache2.internal.ProvidersRxCache.class.getDeclaredMethod("getMockMultipleEvicts", Observable.class, EvictProvider.class, EvictProvider.class);
    Object[] data = { Observable.just(new Object[] {}), new EvictProvider(true), new EvictProvider(true) };
    proxyTranslatorUT.processMethod(mockMethod, data);
}
Also used : Method(java.lang.reflect.Method) EvictProvider(io.rx_cache2.EvictProvider) Test(org.junit.Test)

Aggregations

EvictProvider (io.rx_cache2.EvictProvider)5 ConfigProvider (io.rx_cache2.ConfigProvider)3 Test (org.junit.Test)3 TestObserver (io.reactivex.observers.TestObserver)2 Method (java.lang.reflect.Method)2 Observable (io.reactivex.Observable)1 ObservableEmitter (io.reactivex.ObservableEmitter)1 ObservableOnSubscribe (io.reactivex.ObservableOnSubscribe)1 DynamicKey (io.rx_cache2.DynamicKey)1 EvictDynamicKey (io.rx_cache2.EvictDynamicKey)1 Type (java.lang.reflect.Type)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1