Example #1
0
 /** Tests the {@link PlainSaslServer#getAuthorizationID()} to retrieve the correct user. */
 @Test
 public void userPasswordReceiveTest() throws Exception {
   String testUser = "******";
   String password = "******";
   mPlainSaslServer.evaluateResponse(getUserInfo(testUser, password));
   Assert.assertEquals(testUser, mPlainSaslServer.getAuthorizationID());
 }
Example #2
0
 /** Tests the {@link PlainSaslServer#getAuthorizationID()} method. */
 @Test
 public void authenticationNotCompleteTest() {
   mThrown.expect(IllegalStateException.class);
   mThrown.expectMessage("PLAIN authentication not completed");
   mPlainSaslServer.getAuthorizationID();
 }