public void testCreateWaveletServiceThrowsOnInvalidParticipant() throws Exception { when(waveletData.getParticipants()).thenReturn(Collections.singletonList(MALFORMED_ADDRESS)); try { service.execute(operation, context, ALEX); fail("Expected InvalidRequestException"); } catch (InvalidRequestException e) { // expected } } }
assertFalse(response.isError()); Map<ParamsProperty, Object> responseData = response.getData(); assertEquals("Expected message to be set", MESSAGE, responseData.get(ParamsProperty.MESSAGE)); (String) responseData.get(ParamsProperty.WAVELET_ID)); RobotWaveletData newWavelet = context.getOpenWavelets().get(WaveletName.of(waveId, waveletId)); assertNotNull("A new wavelet must be open", newWavelet); seenAddBob = true; } else { fail("No one else but Alex and Bob should be added"); assertTrue("Alex was not added", seenAddAlex); assertTrue("Bob was not added", seenAddBob);
assertFalse(response.isError()); Map<ParamsProperty, Object> responseData = response.getData(); assertEquals("Expected message to be set", MESSAGE, responseData.get(ParamsProperty.MESSAGE)); (String) responseData.get(ParamsProperty.WAVELET_ID)); RobotWaveletData newWavelet = context.getOpenWavelets().get(WaveletName.of(waveId, waveletId)); assertNotNull("A new wavelet must be open", newWavelet); seenAddBob = true; } else { fail("No one else but Alex and Bob should be added"); assertTrue("Alex was not added", seenAddAlex); assertTrue("Bob was not added", seenAddBob);
public void testCreateWaveletServiceThrowsOnInvalidParticipant() throws Exception { when(waveletData.getParticipants()).thenReturn(Collections.singletonList(MALFORMED_ADDRESS)); try { service.execute(operation, context, ALEX); fail("Expected InvalidRequestException"); } catch (InvalidRequestException e) { // expected } } }