예제 #1
0
 @Test
 public void loginFoundTest() throws Exception {
   when(projectConfiguration.getServerUrl()).thenReturn("TESTSERVER");
   when(userProperties.get("server.TESTSERVER.email")).thenReturn("*****@*****.**");
   when(userProperties.get("server.TESTSERVER.password")).thenReturn("test");
   assertTrue(homeDirLoginProvider.provideLogin());
   verify(loginContext).setLogin(any(Login.class));
 }
예제 #2
0
 @Test
 public void noLoginFoundTest() throws Exception {
   when(projectConfiguration.getServerUrl()).thenReturn("http://www.example.org");
   assertFalse(homeDirLoginProvider.provideLogin());
   verifyZeroInteractions(loginContext);
 }