Search in sources :

Example 71 with FacesMessage

use of javax.faces.application.FacesMessage in project deltaspike by apache.

the class JsfUtilsTest method testNewMessageWithExistingMessageWithoutDetails.

@Test
public void testNewMessageWithExistingMessageWithoutDetails() {
    List<FacesMessage> existingFacesMessage = new ArrayList<FacesMessage>();
    existingFacesMessage.add(new FacesMessage("existing", null));
    FacesMessage messageToCheck = new FacesMessage("new", "message");
    Assert.assertEquals(Boolean.TRUE, JsfUtils.isNewMessage(existingFacesMessage, messageToCheck));
}
Also used : ArrayList(java.util.ArrayList) FacesMessage(javax.faces.application.FacesMessage) Test(org.junit.Test)

Example 72 with FacesMessage

use of javax.faces.application.FacesMessage in project deltaspike by apache.

the class JsfUtilsTest method testNewMessageWithoutText.

@Test
public void testNewMessageWithoutText() {
    List<FacesMessage> existingFacesMessage = new ArrayList<FacesMessage>();
    existingFacesMessage.add(new FacesMessage("existing", "message"));
    FacesMessage messageToCheck = new FacesMessage(null, null);
    Assert.assertEquals(Boolean.TRUE, JsfUtils.isNewMessage(existingFacesMessage, messageToCheck));
}
Also used : ArrayList(java.util.ArrayList) FacesMessage(javax.faces.application.FacesMessage) Test(org.junit.Test)

Example 73 with FacesMessage

use of javax.faces.application.FacesMessage in project deltaspike by apache.

the class JsfUtilsTest method testNewMessageWithExistingMessageWithoutText.

@Test
public void testNewMessageWithExistingMessageWithoutText() {
    List<FacesMessage> existingFacesMessage = new ArrayList<FacesMessage>();
    existingFacesMessage.add(new FacesMessage(null, null));
    FacesMessage messageToCheck = new FacesMessage("test");
    Assert.assertEquals(Boolean.TRUE, JsfUtils.isNewMessage(existingFacesMessage, messageToCheck));
}
Also used : ArrayList(java.util.ArrayList) FacesMessage(javax.faces.application.FacesMessage) Test(org.junit.Test)

Example 74 with FacesMessage

use of javax.faces.application.FacesMessage in project deltaspike by apache.

the class JsfUtilsTest method testNewMessageWithoutDetails.

@Test
public void testNewMessageWithoutDetails() {
    List<FacesMessage> existingFacesMessage = new ArrayList<FacesMessage>();
    existingFacesMessage.add(new FacesMessage("existing", "message"));
    FacesMessage messageToCheck = new FacesMessage("test", null);
    Assert.assertEquals(Boolean.TRUE, JsfUtils.isNewMessage(existingFacesMessage, messageToCheck));
}
Also used : ArrayList(java.util.ArrayList) FacesMessage(javax.faces.application.FacesMessage) Test(org.junit.Test)

Example 75 with FacesMessage

use of javax.faces.application.FacesMessage in project deltaspike by apache.

the class JsfUtilsTest method testNewMessageWithExistingMessageWithoutSummary.

@Test
public void testNewMessageWithExistingMessageWithoutSummary() {
    List<FacesMessage> existingFacesMessage = new ArrayList<FacesMessage>();
    existingFacesMessage.add(new FacesMessage(null, "message"));
    FacesMessage messageToCheck = new FacesMessage("new", "message");
    Assert.assertEquals(Boolean.TRUE, JsfUtils.isNewMessage(existingFacesMessage, messageToCheck));
}
Also used : ArrayList(java.util.ArrayList) FacesMessage(javax.faces.application.FacesMessage) Test(org.junit.Test)

Aggregations

FacesMessage (javax.faces.application.FacesMessage)370 ConceptHelper (mom.trd.opentheso.bdd.helper.ConceptHelper)43 SQLException (java.sql.SQLException)40 Connection (java.sql.Connection)34 FacesContext (javax.faces.context.FacesContext)25 ArrayList (java.util.ArrayList)24 UIInput (javax.faces.component.UIInput)24 ValidatorException (javax.faces.validator.ValidatorException)24 GroupHelper (mom.trd.opentheso.bdd.helper.GroupHelper)22 NodeAutoCompletion (mom.trd.opentheso.bdd.helper.nodes.NodeAutoCompletion)22 CandidateHelper (mom.trd.opentheso.bdd.helper.CandidateHelper)19 UserHelper2 (mom.trd.opentheso.bdd.helper.UserHelper2)19 IOException (java.io.IOException)16 NoteHelper (mom.trd.opentheso.bdd.helper.NoteHelper)15 Test (org.junit.Test)13 TermHelper (mom.trd.opentheso.bdd.helper.TermHelper)12 Term (mom.trd.opentheso.bdd.datas.Term)11 UploadedFile (org.primefaces.model.UploadedFile)11 HikariDataSource (com.zaxxer.hikari.HikariDataSource)10 Date (java.util.Date)10