/** * Signs up a new user. You should call this instead of {@link #save} for new ParseUsers. This * will create a new ParseUser on the server, and also persist the session on disk so that you can * access the user using {@link #getCurrentUser}. * <p/> * A username and password must be set before calling signUp. * <p/> * This is preferable to using {@link #signUp}, unless your code is already running from a * background thread. * * @param callback callback.done(user, e) is called when the signUp completes. */ public void signUpInBackground(SignUpCallback callback) { ParseTaskUtils.callbackOnMainThreadAsync(signUpInBackground(), callback); }
/** * Signs up a new user. You should call this instead of {@link #save} for new ParseUsers. This * will create a new ParseUser on the server, and also persist the session on disk so that you can * access the user using {@link #getCurrentUser}. * <p/> * A username and password must be set before calling signUp. * <p/> * Typically, you should use {@link #signUpInBackground} instead of this, unless you are managing * your own threading. * * @throws ParseException Throws an exception if the server is inaccessible, or if the username has already * been taken. */ public void signUp() throws ParseException { ParseTaskUtils.wait(signUpInBackground()); }
@NonNull public static Completable signUp(@NonNull final ParseUser user) { return RxTask.completable(() -> user.signUpInBackground()); }
user.signUpInBackground(new SignUpCallback() { public void done(ParseException e) { if (e == null) {
user.signUpInBackground(new SignUpCallback() {
@Test public void testParseObservableSignUp() { rx.parse2.ParseObservable.signUp(mocker(ParseUser.class) .when(user -> user.signUpInBackground()) .thenReturn(user -> Task.<Void>forResult(null)) .mock()) .test() .assertNoErrors() .assertComplete(); }