@Test public void deleteObjectInBackground() throws Exception { NCMBRole role = new NCMBRole("testRole"); role.setObjectId("dummyRoleId"); role.deleteObjectInBackground(new DoneCallback() { @Override public void done(NCMBException e) { if (e != null) { Assert.fail(e.getMessage()); } callbackFlag = true; } }); Robolectric.flushBackgroundThreadScheduler(); ShadowLooper.runUiThreadTasks(); Assert.assertNull(role.getRoleName()); Assert.assertNull(role.getObjectId()); Assert.assertTrue(callbackFlag); }
public void deleteObjectInBackground(final DoneCallback callback) throws NCMBException { NCMBRoleService roleService = (NCMBRoleService) NCMB.factory(NCMB.ServiceType.ROLE); roleService.deleteRoleInBackground(getObjectId(), new DoneCallback() { @Override public void done(NCMBException e) { if (e != null) { if (callback != null) { callback.done(e); } } else { mFields = new JSONObject(); if (callback != null) { callback.done(null); } } } }); }
NCMBRole extends NCMBBase { public void deleteObjectInBackground(final DoneCallback callback) throws NCMBException { NCMBRoleService roleService = (NCMBRoleService) NCMB.factory(NCMB.ServiceType.ROLE); roleService.deleteRoleInBackground(getObjectId(), new DoneCallback() { @Override public void done(NCMBException e) { if (e != null) { if (callback != null) { callback.done(e); } } else { mFields = new JSONObject(); if (callback != null) { callback.done(null); } } } }); } }
NCMBRole extends NCMBBase { public void deleteObjectInBackground(final DoneCallback callback) throws NCMBException { NCMBRoleService roleService = (NCMBRoleService) NCMB.factory(NCMB.ServiceType.ROLE); roleService.deleteRoleInBackground(getObjectId(), new DoneCallback() { @Override public void done(NCMBException e) { if (e != null) { if (callback != null) { callback.done(e); } } else { mFields = new JSONObject(); if (callback != null) { callback.done(null); } } } }); } NCMBRole();  NCMBRole(String name);   NCMBRole(JSONObject params); }
NCMBRole extends NCMBBase { public void deleteObjectInBackground(final DoneCallback callback) throws NCMBException { NCMBRoleService roleService = (NCMBRoleService) NCMB.factory(NCMB.ServiceType.ROLE); roleService.deleteRoleInBackground(getObjectId(), new DoneCallback() { @Override public void done(NCMBException e) { if (e != null) { if (callback != null) { callback.done(e); } } else { mFields = new JSONObject(); if (callback != null) { callback.done(null); } } } }); } NCMBRole();  NCMBRole(String name);   NCMBRole(JSONObject params); static NCMBQuery<NCMBRole> getQuery(); String getRoleName(); void setRoleName(String name); void addUser(List<NCMBUser> users); void addUserInBackground(List<NCMBUser> users, final DoneCallback callback); void removeUser(List<NCMBUser> users); void removeUserInBackground(List<NCMBUser> users, final DoneCallback callback); void addRole(List<NCMBRole> roles); void addRoleInBackground(List<NCMBRole> roles, final DoneCallback callback); void removeRole(List<NCMBRole> roles); void removeRoleInBackground(List<NCMBRole> roles, final DoneCallback callback); void createRole(); void createRoleInBackground(final DoneCallback callback); void fetchObject(); void fetchObjectInBackground(final FetchCallback callback); void deleteObject(); void deleteObjectInBackground(final DoneCallback callback); }
NCMBRole extends NCMBBase { public void deleteObjectInBackground(final DoneCallback callback) throws NCMBException { NCMBRoleService roleService = (NCMBRoleService) NCMB.factory(NCMB.ServiceType.ROLE); roleService.deleteRoleInBackground(getObjectId(), new DoneCallback() { @Override public void done(NCMBException e) { if (e != null) { if (callback != null) { callback.done(e); } } else { mFields = new JSONObject(); if (callback != null) { callback.done(null); } } } }); } NCMBRole();  NCMBRole(String name);   NCMBRole(JSONObject params); static NCMBQuery<NCMBRole> getQuery(); String getRoleName(); void setRoleName(String name); void addUser(List<NCMBUser> users); void addUserInBackground(List<NCMBUser> users, final DoneCallback callback); void removeUser(List<NCMBUser> users); void removeUserInBackground(List<NCMBUser> users, final DoneCallback callback); void addRole(List<NCMBRole> roles); void addRoleInBackground(List<NCMBRole> roles, final DoneCallback callback); void removeRole(List<NCMBRole> roles); void removeRoleInBackground(List<NCMBRole> roles, final DoneCallback callback); void createRole(); void createRoleInBackground(final DoneCallback callback); void fetchObject(); void fetchObjectInBackground(final FetchCallback callback); void deleteObject(); void deleteObjectInBackground(final DoneCallback callback);  }