Example #1
0
 @Test
 public void testUserNameUsingFirstName() {
   final String firstName = "Mock";
   when(user.getProperty(User.StandardUserProperties.FIRST_NAME)).thenReturn(firstName);
   userMenu.setup();
   verify(userMenuView).setUserName(firstName);
 }
Example #2
0
 @Test
 public void testUserNameUsingLastName() {
   final String lastName = "Test";
   when(user.getProperty(User.StandardUserProperties.LAST_NAME)).thenReturn(lastName);
   userMenu.setup();
   verify(userMenuView).setUserName(lastName);
 }
Example #3
0
 @Test
 public void testUserNameWithId() {
   final String userName = "******";
   when(user.getIdentifier()).thenReturn(userName);
   userMenu.setup();
   verify(userMenuView).setUserName(userName);
 }