"pete.muir(a)jboss.org" wrote : Try using an integration test. This use of the
Java SE in a unit test is one I don't like.
The integration test rise me the following error:
anonymous wrote :
| FAILED: testBuscarExpediente
| java.lang.NoClassDefFoundError: com/sun/el/ExpressionFactoryImpl
| at org.jboss.seam.util.UnifiedELValueBinding.(UnifiedELValueBinding.java:18)
| at org.jboss.seam.mock.MockApplication.createValueBinding(MockApplication.java:272)
| at
org.jboss.seam.jsf.SeamApplication11.createValueBinding(SeamApplication11.java:116)
| at org.jboss.seam.mock.SeamTest$Request.setValue(SeamTest.java:374)
| at
pruebas.ExpedienteFacadeIntegrationTest$1.updateModelValues(ExpedienteFacadeIntegrationTest.java:28)
| at org.jboss.seam.mock.SeamTest$Request.run(SeamTest.java:476)
| at
pruebas.ExpedienteFacadeIntegrationTest.testBuscarExpediente(ExpedienteFacadeIntegrationTest.java:46)
| ... Removed 22 stack frames
This is the code of the integration test:
anonymous wrote :
| package pruebas;
|
| import org.jboss.seam.mock.SeamTest;
| import org.testng.annotations.Test;
|
| public class ExpedienteFacadeIntegrationTest extends SeamTest
| {
|
| @Test
| public void testBuscarExpediente()throws Exception
| {
| new FacesRequest() {
|
| /*
| @Override
| protected void processValidations() throws Exception
| {
| validateValue("#{house.address}", "123 Main Street");
| validateValue("#{house.city}", "Columbus");
| validateValue("#{house.state}", "OH");
| assert !isValidationFailure();
| }
|
| */
| @Override
| protected void updateModelValues() throws Exception
| {
| setValue("#{expediente.nroExpediente}", "123");
| setValue("#{expediente.tipoAcusado}", "Acusado Libre");
| //setValue("#{expediente.fechaTurnado}", "Jan 1, 2008");
| }
|
| @Override
| protected void invokeApplication()
| {
| assert
invokeMethod("#{expedienteFacade.buscarExpediente}").equals("success");
| }
|
| @Override
| protected void renderResponse()
| {
| assert
getValue("#{expedienteFacade.expedientesEncontrados.size}").equals(7);
| //assert getValue("#{house.city}").equals("Columbus");
| //assert getValue("#{house.state}").equals("OH");
| }
| }.run();
| }
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125219#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...