Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using EL Expression tests for messages #770

Merged
merged 1 commit into from
Sep 1, 2014

Conversation

garcia-jj
Copy link
Member

May be useful? I think that we can improve our tests checking if expression language can catch properly some objects we export to view.

Since javax.el artifact is marked as provided, I think that won't generated any dependency problem.

@rponte
Copy link
Contributor

rponte commented Aug 31, 2014

Nice!

On Sunday, August 31, 2014, Otávio Garcia notifications@github.com wrote:

May be useful? I think that we can improve our tests checking if
expression language can catch properly some objects we export to view.

Since javax.el artifact is marked as provided, I think that won't

generated any dependency problem.

You can merge this Pull Request by running

git pull https://github.com/caelum/vraptor4 ot-messagestestwith-el

Or view, comment on, or merge it at:

#770
Commit Summary

  • Using EL Expression tests for messages

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#770.

Rafael Ponte
TriadWorks | Formação Java
http://cursos.triadworks.com.br

<groupId>org.jboss.spec.javax.interceptor</groupId>
</exclusion>
<exclusion>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any difference between javax.el-api and el-api?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

javax.el:el-api is 2.0 maintenance release. javax.el:javax.el-api is 3.0 release.

@garcia-jj
Copy link
Member Author

LinkTo feature can be tested using this approach.

@Turini
Copy link
Member

Turini commented Sep 1, 2014

LinkTo feature can be tested using this approach.

this is very nice!

garcia-jj added a commit that referenced this pull request Sep 1, 2014
Using EL Expression tests for messages
@garcia-jj garcia-jj merged commit 2df8aca into ot-messagestest Sep 1, 2014
@garcia-jj garcia-jj deleted the ot-messagestestwith-el branch September 1, 2014 13:33
@renanigt
Copy link
Contributor

renanigt commented Sep 1, 2014

This test is breaking when call new ELProcessor():

public void testElExpressionGettingMessagesByCaegory() {

@garcia-jj
Copy link
Member Author

Works fine to me, runing tests right now. Have you with your workspace up2date with new maven dependencies, introduced by this pull request?

@renanigt
Copy link
Contributor

renanigt commented Sep 2, 2014

Yes @garcia-jj, my workspace is up-to-date with new maven dependencies.

Someone may also test it ?

The error is:

java.lang.NoSuchMethodError: javax.el.ELUtil.getExpressionFactory()Ljavax/el/ExpressionFactory;
    at javax.el.ELManager.getExpressionFactory(ELManager.java:61)
    at javax.el.ELProcessor.<init>(ELProcessor.java:99)
    at br.com.caelum.vraptor.validator.MessagesTest.testElExpressionGettingMessagesByCaegory(MessagesTest.java:101)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

@garcia-jj
Copy link
Member Author

Travis runs ok right now: https://travis-ci.org/caelum/vraptor4/builds/34151368

@renanigt
Copy link
Contributor

renanigt commented Sep 2, 2014

I don't know why this happening here at home and also on work.
But I'll do another tests.

Thanks @garcia-jj

@garcia-jj
Copy link
Member Author

What's happens if you run using command line?

@renanigt
Copy link
Contributor

renanigt commented Sep 2, 2014

Running it using command line the MessagesTest works fine, breaking just these tests:

shouldNotRunVRaptorStackIfVRaptorRequestStartedEventNotFired(br.com.caelum.vraptor.ioc.RequestStartedFactoryTest): WELD-001303: No active contexts for scope type javax.enterprise.context.RequestScoped
shouldRunVRaptorStackIfVRaptorRequestStartedEventIsFired(br.com.caelum.vraptor.ioc.RequestStartedFactoryTest): WELD-001303: No active contexts for scope type javax.enterprise.context.RequestScoped
shoudRegisterResourcesInRouter(br.com.caelum.vraptor.ioc.cdi.CDIBasedContainerTest): You shouldn't add more interceptors after ordering. Please notify vraptor developers.
shouldReturnAllDefaultConverters(br.com.caelum.vraptor.ioc.cdi.CDIBasedContainerTest): You shouldn't add more interceptors after ordering. Please notify vraptor developers.
shouldReturnAllDefaultDeserializers(br.com.caelum.vraptor.ioc.cdi.CDIBasedContainerTest): You shouldn't add more interceptors after ordering. Please notify vraptor developers.
shoudRegisterConvertersInConverters(br.com.caelum.vraptor.ioc.cdi.CDIBasedContainerTest): You shouldn't add more interceptors after ordering. Please notify vraptor developers.
shoudRegisterInterceptorsInInterceptorRegistry(br.com.caelum.vraptor.ioc.cdi.CDIBasedContainerTest): You shouldn't add more interceptors after ordering. Please notify vraptor developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants