public void testProxyForShouldFailIfProxyIdIsInvalid() throws Exception { try { wavelet.proxyFor("foo@gmail.com"); fail("Should have failed since proxy id is not encoded."); } catch (IllegalArgumentException e) { // Expected. } }
public void testProxyForShouldFailIfProxyIdIsInvalid() throws Exception { try { wavelet.proxyFor("foo@gmail.com"); fail("Should have failed since proxy id is not encoded."); } catch (IllegalArgumentException e) { // Expected. } }
public void testProxyFor() throws Exception { OperationQueue proxiedQueue = mock(OperationQueue.class); when(opQueue.proxyFor("user2")).thenReturn(proxiedQueue); wavelet.setRobotAddress("foo+user1#5@appspot.com"); Wavelet proxiedWavelet = wavelet.proxyFor("user2"); assertTrue(wavelet.getParticipants().contains("foo+user2#5@appspot.com")); assertEquals(proxiedQueue, proxiedWavelet.getOperationQueue()); }
public void testProxyFor() throws Exception { OperationQueue proxiedQueue = mock(OperationQueue.class); when(opQueue.proxyFor("user2")).thenReturn(proxiedQueue); wavelet.setRobotAddress("foo+user1#5@appspot.com"); Wavelet proxiedWavelet = wavelet.proxyFor("user2"); assertTrue(wavelet.getParticipants().contains("foo+user2#5@appspot.com")); assertEquals(proxiedQueue, proxiedWavelet.getOperationQueue()); }