public void testRegisterNewFailsOnInvalidLocation() throws PersistenceException { String invalidLocation = "ftp://some$$$&&&###.com"; try { registrar.registerNew(ROBOT_ID, invalidLocation); fail("Location " + invalidLocation + " is invalid, exception is expected."); } catch (RobotRegistrationException e) { // Expected. } }
public void testRegisterNewFailsOnInvalidLocation() throws PersistenceException { String invalidLocation = "ftp://some$$$&&&###.com"; try { registrar.registerNew(ROBOT_ID, invalidLocation); fail("Location " + invalidLocation + " is invalid, exception is expected."); } catch (RobotRegistrationException e) { // Expected. } }
public void testRegisterNewFailsOnExistingAccount() throws PersistenceException { when(accountStore.getAccount(ROBOT_ID)).thenReturn(accountData); try { registrar.registerNew(ROBOT_ID, LOCATION); fail(); } catch (RobotRegistrationException e) { // Expected. } }
public void testRegisterNewFailsOnExistingAccount() throws PersistenceException { when(accountStore.getAccount(ROBOT_ID)).thenReturn(accountData); try { registrar.registerNew(ROBOT_ID, LOCATION); fail(); } catch (RobotRegistrationException e) { // Expected. } }
public void testUnregisterFailsOnHumanAccount() throws PersistenceException { when(accountStore.getAccount(HUMAN_ID)).thenReturn( new HumanAccountDataImpl(ParticipantId.ofUnsafe(HUMAN_ID.getAddress()))); try { registrar.unregister(HUMAN_ID); fail(); } catch (RobotRegistrationException e) { // Expected. } }
public void testReRegisterFailsOnExistingHumanAccount() throws PersistenceException { when(accountStore.getAccount(HUMAN_ID)).thenReturn( new HumanAccountDataImpl(ParticipantId.ofUnsafe(HUMAN_ID.getAddress()))); try { registrar.registerOrUpdate(HUMAN_ID, OTHER_LOCATION); fail(); } catch (RobotRegistrationException e) { // Expected. } }
public void testReRegisterFailsOnExistingHumanAccount() throws PersistenceException { when(accountStore.getAccount(HUMAN_ID)).thenReturn( new HumanAccountDataImpl(ParticipantId.ofUnsafe(HUMAN_ID.getAddress()))); try { registrar.registerOrUpdate(HUMAN_ID, OTHER_LOCATION); fail(); } catch (RobotRegistrationException e) { // Expected. } }
public void testUnregisterFailsOnHumanAccount() throws PersistenceException { when(accountStore.getAccount(HUMAN_ID)).thenReturn( new HumanAccountDataImpl(ParticipantId.ofUnsafe(HUMAN_ID.getAddress()))); try { registrar.unregister(HUMAN_ID); fail(); } catch (RobotRegistrationException e) { // Expected. } }