Salut j'ai un bean JSF(une classe qui s'appelle authentification.java qui est le mapping de page authentification.jsp)
j'ai ce code la
voila mon test unitaire avec Junitpublic void check_username_password()
if (ldap_check_authentication_.check_authentication(this.ldap_name_and_first_name,this.ldap_password) == false)
{
System.out.println("false authentication");
this.binding_modal_panel_false_ressource_name_password.setRendered(true);
return null;
}
else
{
System.out.println("tout vas bien");
}
}
beh c'est clair que ce code la(qui ferme un model panel) me fait une probléme@Test
public void test()
{
Authentication authentication_ = new Authentication();
authentication_.setLdap_password("johnpass");
authentication_.setLdap_name_and_first_name("john");
authentication_.check_username_passwod();
}
Comment résoudre cette probléme pour bien tester mon bean?this.binding_modal_panel_false_ressource_name_password.setRendered(true);
Est ce que le AOP peut me résoudre cette probléme(j'ai entendu qu'elle peut dépasser cette ligne de code qui me fait le probléme).
Merci d'avance

 

 
		
		 
        

 
			
			



 Test unitaire d'un bean JSF
 Test unitaire d'un bean JSF
				 Répondre avec citation
  Répondre avec citation 
						
Partager