@Test public void testGetAllKeys() throws Exception { module.getAllKeys(callback); verify(callback,times(1)).invoke(any()); }
@Override @JSMethod(uiThread = false) public void getAllKeys(@Nullable final JSCallback callback) { IWXStorageAdapter adapter = ability(); if (adapter == null) { StorageResultHandler.handleNoHandlerError(callback); return; } adapter.getAllKeys(new IWXStorageAdapter.OnResultReceivedListener() { @Override public void onReceived(Map<String, Object> data) { if(callback != null){ callback.invoke(data); } } }); }
WXStorageModule extends WXSDKEngine.DestroyableModule implements IWXStorage { @Override @JSMethod(uiThread = false) public void getAllKeys(@Nullable final JSCallback callback) { IWXStorageAdapter adapter = ability(); if (adapter == null) { StorageResultHandler.handleNoHandlerError(callback); return; } adapter.getAllKeys(new IWXStorageAdapter.OnResultReceivedListener() { @Override public void onReceived(Map<String, Object> data) { if(callback != null){ callback.invoke(data); } } }); } }
WXStorageModule extends WXSDKEngine.DestroyableModule implements IWXStorage { @Override @JSMethod(uiThread = false) public void getAllKeys(@Nullable final JSCallback callback) { IWXStorageAdapter adapter = ability(); if (adapter == null) { StorageResultHandler.handleNoHandlerError(callback); return; } adapter.getAllKeys(new IWXStorageAdapter.OnResultReceivedListener() { @Override public void onReceived(Map<String, Object> data) { if(callback != null){ callback.invoke(data); } } }); }  }
WXStorageModule extends WXSDKEngine.DestroyableModule implements IWXStorage { @Override @JSMethod(uiThread = false) public void getAllKeys(@Nullable final JSCallback callback) { IWXStorageAdapter adapter = ability(); if (adapter == null) { StorageResultHandler.handleNoHandlerError(callback); return; } adapter.getAllKeys(new IWXStorageAdapter.OnResultReceivedListener() { @Override public void onReceived(Map<String, Object> data) { if(callback != null){ callback.invoke(data); } } }); }  @Override @JSMethod(uiThread = false) void setItem(String key, String value, @Nullable final JSCallback callback); @Override @JSMethod(uiThread = false) void getItem(String key, @Nullable final JSCallback callback); @Override @JSMethod(uiThread = false) void removeItem(String key, @Nullable final JSCallback callback); @Override @JSMethod(uiThread = false) void length(@Nullable final JSCallback callback); @Override @JSMethod(uiThread = false) void getAllKeys(@Nullable final JSCallback callback); @Override @JSMethod(uiThread = false) void setItemPersistent(String key, String value, @Nullable final JSCallback callback); @Override void destroy(); }
WXStorageModule extends WXSDKEngine.DestroyableModule implements IWXStorage { @Override @JSMethod(uiThread = false) public void getAllKeys(@Nullable final JSCallback callback) { IWXStorageAdapter adapter = ability(); if (adapter == null) { StorageResultHandler.handleNoHandlerError(callback); return; } adapter.getAllKeys(new IWXStorageAdapter.OnResultReceivedListener() { @Override public void onReceived(Map<String, Object> data) { if(callback != null){ callback.invoke(data); } } }); }  @Override @JSMethod(uiThread = false) void setItem(String key, String value, @Nullable final JSCallback callback); @Override @JSMethod(uiThread = false) void getItem(String key, @Nullable final JSCallback callback); @Override @JSMethod(uiThread = false) void removeItem(String key, @Nullable final JSCallback callback); @Override @JSMethod(uiThread = false) void length(@Nullable final JSCallback callback); @Override @JSMethod(uiThread = false) void getAllKeys(@Nullable final JSCallback callback); @Override @JSMethod(uiThread = false) void setItemPersistent(String key, String value, @Nullable final JSCallback callback); @Override void destroy();  }