use of com.taobao.weex.WXSDKManager in project weex-example by KalicyZhou.
the class DefaultUriAdapterTest method setup.
@Before
public void setup() {
WXEnvironment.sApplication = RuntimeEnvironment.application;
WXSDKManager wxsdkManager = WXSDKManager.getInstance();
if (!new MockUtil().isSpy(wxsdkManager)) {
WXSDKManager spy = Mockito.spy(wxsdkManager);
WXSDKManagerTest.setInstance(spy);
Mockito.when(spy.getIWXHttpAdapter()).thenReturn(new IWXHttpAdapter() {
@Override
public void sendRequest(WXRequest request, OnHttpListener listener) {
//do nothing.
}
});
}
adapter = new DefaultUriAdapter();
instance = WXSDKInstanceTest.createInstance();
}
use of com.taobao.weex.WXSDKManager in project incubator-weex by apache.
the class DefaultUriAdapterTest method setup.
@Before
public void setup() {
WXEnvironment.sApplication = RuntimeEnvironment.application;
WXSDKManager wxsdkManager = WXSDKManager.getInstance();
if (!new MockUtil().isSpy(wxsdkManager)) {
WXSDKManager spy = Mockito.spy(wxsdkManager);
WXSDKManagerTest.setInstance(spy);
Mockito.when(spy.getIWXHttpAdapter()).thenReturn(new IWXHttpAdapter() {
@Override
public void sendRequest(WXRequest request, OnHttpListener listener) {
// do nothing.
}
});
}
adapter = new DefaultUriAdapter();
instance = WXSDKInstanceTest.createInstance();
}
Aggregations