public Update ( string roleId, string adminId = null, string adminEmail = null ) : Task |
||
roleId | string | New admin's instance role id to set (see role.get()). |
adminId | string | The admin id to update. |
adminEmail | string | The admin email to update. |
return | Task |
public async Task Update_WithNullRoleId_ThrowsException(AdministratorSyncanoClient client) { try { //when await client.Update(null, TestData.AdminId); throw new Exception("Update should throw an exception"); } catch (Exception e) { //then e.ShouldBeType<ArgumentNullException>(); } }
public async Task Update_WithInvalidRoldeId_ThrowsException(AdministratorSyncanoClient client) { try { //when await client.Update("99", TestData.AdminId); throw new Exception("Update should throw an exception"); } catch (Exception e) { //then e.ShouldBeType<SyncanoException>(); } }
public async Task Update_WithInvalidAdminEmail_ThrowsException(AdministratorSyncanoClient client) { try { //when await client.Update(TestData.RoleId, adminEmail: "*****@*****.**"); throw new Exception("Update should throw an exception"); } catch (Exception e) { //then e.ShouldBeType<SyncanoException>(); } }