File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed
java/org/javaee7/el/standalone Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ package org .javaee7 .el .standalone ;
2+
3+ import org .jboss .arquillian .container .test .api .Deployment ;
4+ import org .jboss .arquillian .junit .Arquillian ;
5+ import org .jboss .shrinkwrap .api .Archive ;
6+ import org .jboss .shrinkwrap .api .ShrinkWrap ;
7+ import org .jboss .shrinkwrap .api .spec .JavaArchive ;
8+ import org .junit .Before ;
9+ import org .junit .Test ;
10+ import org .junit .runner .RunWith ;
11+
12+ import javax .el .ELProcessor ;
13+
14+ import static org .junit .Assert .assertEquals ;
15+
16+
17+ /**
18+ * @author Alexis Hassler
19+ */
20+ @ RunWith (Arquillian .class )
21+ public class ELResolverTest {
22+
23+ @ Deployment
24+ public static Archive <?> deploy () {
25+ return ShrinkWrap .create (JavaArchive .class );
26+ }
27+ private ELProcessor elProcessor ;
28+
29+ @ Before
30+ public void setup () {
31+ elProcessor = new ELProcessor ();
32+ }
33+
34+ @ Test
35+ public void should_pick_in_the_array () {
36+ Object result = elProcessor .eval ("a = [1, 2, 3]; a[1]" );
37+ assertEquals (2L , result );
38+ }
39+
40+ @ Test
41+ public void should_add () {
42+ Object result = elProcessor .eval ("((x,y) -> x+y)(4, 5)" );
43+ assertEquals (9L , result );
44+ }
45+ }
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <arquillian xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xmlns =" http://jboss.org/schema/arquillian" xsi : schemaLocation =" http://jboss.org/schema/arquillian
3+ http://jboss.org/schema/arquillian/arquillian_1_0.xsd" >
4+
5+ <defaultProtocol type =" Servlet 3.0" />
6+
7+ <container qualifier =" test" default =" true" >
8+ <configuration >
9+ <property name =" jbossHome" >${serverRoot:target/wildfly-8.0.0.Beta1}</property >
10+ <property name =" serverConfig" >${serverProfile:standalone-full.xml}</property >
11+ </configuration >
12+ </container >
13+
14+ </arquillian >
You can’t perform that action at this time.
0 commit comments