@Test public void testSetItem() throws Exception { storage.setItem("","",listener); verify(listener,timeout(3000).times(1)).onReceived(anyMapOf(String.class,Object.class)); storage.close(); }
@Override public void setItem(final String key, final String value, final OnResultReceivedListener listener) { execute(new Runnable() { @Override public void run() { Map<String, Object> data = StorageResultHandler.setItemResult(performSetItem(key, value, false, true)); if (listener == null) { return; } listener.onReceived(data); } }); }
DefaultWXStorage implements IWXStorageAdapter { @Override public void setItem(final String key, final String value, final OnResultReceivedListener listener) { execute(new Runnable() { @Override public void run() { Map<String, Object> data = StorageResultHandler.setItemResult(performSetItem(key, value, false, true)); if (listener == null) { return; } listener.onReceived(data); } }); } }
DefaultWXStorage implements IWXStorageAdapter { @Override public void setItem(final String key, final String value, final OnResultReceivedListener listener) { execute(new Runnable() { @Override public void run() { Map<String, Object> data = StorageResultHandler.setItemResult(performSetItem(key, value, false, true)); if (listener == null) { return; } listener.onReceived(data); } }); } DefaultWXStorage(Context context); }
DefaultWXStorage implements IWXStorageAdapter { @Override public void setItem(final String key, final String value, final OnResultReceivedListener listener) { execute(new Runnable() { @Override public void run() { Map<String, Object> data = StorageResultHandler.setItemResult(performSetItem(key, value, false, true)); if (listener == null) { return; } listener.onReceived(data); } }); } DefaultWXStorage(Context context); @Override void setItem(final String key, final String value, final OnResultReceivedListener listener); @Override void getItem(final String key, final OnResultReceivedListener listener); @Override void removeItem(final String key, final OnResultReceivedListener listener); @Override void length(final OnResultReceivedListener listener); @Override void getAllKeys(final OnResultReceivedListener listener); @Override void setItemPersistent(final String key, final String value, final OnResultReceivedListener listener); @Override void close(); }
DefaultWXStorage implements IWXStorageAdapter { @Override public void setItem(final String key, final String value, final OnResultReceivedListener listener) { execute(new Runnable() { @Override public void run() { Map<String, Object> data = StorageResultHandler.setItemResult(performSetItem(key, value, false, true)); if (listener == null) { return; } listener.onReceived(data); } }); } DefaultWXStorage(Context context); @Override void setItem(final String key, final String value, final OnResultReceivedListener listener); @Override void getItem(final String key, final OnResultReceivedListener listener); @Override void removeItem(final String key, final OnResultReceivedListener listener); @Override void length(final OnResultReceivedListener listener); @Override void getAllKeys(final OnResultReceivedListener listener); @Override void setItemPersistent(final String key, final String value, final OnResultReceivedListener listener); @Override void close();  }