use of io.divide.client.auth.SignUpResponse in project divide by HiddenStage.
the class DataManagerTest method testSend.
@Test
public void testSend() throws Exception {
SignUpResponse response = authManager.signUp(new SignUpCredentials("name", "email", ""));
assertEquals(response.get().getUsername(), "name");
BackendServices.remote().save(new BackendObject()).toBlockingObservable();
}
use of io.divide.client.auth.SignUpResponse in project divide by HiddenStage.
the class BackendUser method signUp.
/**
* Synchronously sign up using credentials provided via constructor or setters.
* @return boolean indicating sign up success
*/
public boolean signUp() {
SignUpCredentials creds = new SignUpCredentials(getUsername(), getEmailAddress(), getPassword());
SignUpResponse response = getAM().signUp(creds);
if (response.getStatus().isSuccess()) {
this.initFrom(response.get());
return true;
} else
return false;
}
Aggregations