File tree Expand file tree Collapse file tree 4 files changed +39
-182
lines changed
java/org/javaee7/cdi/decorators
test/java/org/javaee7/cdi/decorators Expand file tree Collapse file tree 4 files changed +39
-182
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ public class MyDecorator implements Greeting {
5454
5555 @ Override
5656 public String greet (String name ) {
57- return greeting .greet (name + " <b> very much!</b> " );
57+ return greeting .greet (name + " very much!" );
5858 }
5959
6060}
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ package org .javaee7 .cdi .decorators ;
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 .Test ;
9+ import org .junit .runner .RunWith ;
10+
11+ import javax .inject .Inject ;
12+ import java .io .File ;
13+ import java .net .URISyntaxException ;
14+
15+ import static org .hamcrest .core .Is .is ;
16+ import static org .junit .Assert .assertThat ;
17+
18+ /**
19+ * @author Korneliusz Rabczak
20+ */
21+ @ RunWith (Arquillian .class )
22+ public class DecoratorTest {
23+
24+ @ Inject
25+ Greeting greeting ;
26+
27+ @ Deployment
28+ public static Archive <?> deploy () throws URISyntaxException {
29+ return ShrinkWrap .create (JavaArchive .class )
30+ .addAsManifestResource (new File ("src/main/webapp/WEB-INF/beans.xml" ), "beans.xml" )
31+ .addPackage (SimpleGreeting .class .getPackage ());
32+ }
33+
34+ @ Test
35+ public void test () {
36+ assertThat (greeting .greet ("Duke" ), is ("Hello Duke very much!" ));
37+ }
38+ }
You can’t perform that action at this time.
0 commit comments