@Test public void testGetAsyncWithInMemoryCurrentUserSet() throws Exception { ParseUser currentUserInMemory = new ParseUser(); CachedCurrentUserController controller = new CachedCurrentUserController(null); controller.currentUser = currentUserInMemory; ParseUser currentUser = ParseTaskUtils.wait(controller.getAsync(false)); assertSame(currentUserInMemory, currentUser); }
@Override public Task<ParseUser> getAsync() { return getAsync(ParseUser.isAutomaticUserEnabled()); }
CachedCurrentUserController implements ParseCurrentUserController { @Override public Task<ParseUser> getAsync() { return getAsync(ParseUser.isAutomaticUserEnabled()); } }
CachedCurrentUserController implements ParseCurrentUserController { @Override public Task<ParseUser> getAsync() { return getAsync(ParseUser.isAutomaticUserEnabled()); } CachedCurrentUserController(ParseObjectStore<ParseUser> store); }
CachedCurrentUserController implements ParseCurrentUserController { @Override public Task<ParseUser> getAsync() { return getAsync(ParseUser.isAutomaticUserEnabled()); } CachedCurrentUserController(ParseObjectStore<ParseUser> store); @Override Task<Void> setAsync(final ParseUser user); @Override Task<Void> setIfNeededAsync(ParseUser user); @Override Task<ParseUser> getAsync(); @Override Task<Boolean> existsAsync(); @Override boolean isCurrent(ParseUser user); @Override void clearFromMemory(); @Override void clearFromDisk(); @Override Task<String> getCurrentSessionTokenAsync(); @Override Task<Void> logOutAsync(); @Override Task<ParseUser> getAsync(final boolean shouldAutoCreateUser); }
CachedCurrentUserController implements ParseCurrentUserController { @Override public Task<ParseUser> getAsync() { return getAsync(ParseUser.isAutomaticUserEnabled()); } CachedCurrentUserController(ParseObjectStore<ParseUser> store); @Override Task<Void> setAsync(final ParseUser user); @Override Task<Void> setIfNeededAsync(ParseUser user); @Override Task<ParseUser> getAsync(); @Override Task<Boolean> existsAsync(); @Override boolean isCurrent(ParseUser user); @Override void clearFromMemory(); @Override void clearFromDisk(); @Override Task<String> getCurrentSessionTokenAsync(); @Override Task<Void> logOutAsync(); @Override Task<ParseUser> getAsync(final boolean shouldAutoCreateUser);  }