aslak

Arquillian - WeldCoreTests - New @Deployment

Apr 27th, 2010
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.80 KB | None | 0 0
  1. public class BasicDecoratorResolutionTest extends Arquillian
  2. {
  3.    @Deployment(includeTestPackage=true, archiveName = "test.jar")
  4.    public static Archive<?> deploy(BeanArchive archive)
  5.    {
  6.       return archive.decorate(SimpleDecorator.class, ComplexDecorator.class);
  7.    }
  8.  
  9.    @Test(dataProvider = ARQUILLIAN_DATA_PROVIDER)
  10.    public void testBasicDecoratorInvocation(@Simple SimpleBean simpleBean)
  11.    {
  12.       String result = simpleBean.hello("world");
  13.       assert "simple-Hello, world-simple".equals(result);
  14.    }
  15.  
  16.    @Test(dataProvider = ARQUILLIAN_DATA_PROVIDER)
  17.    public void testComplexDecoratorInvocation(@Complex ComplexBean complexBean)
  18.    {
  19.       String result = complexBean.hello("world");
  20.       assert "simple-complex-Sophisticated Hello, world-complex-simple".equals(result);
  21.    }
  22. }
Add Comment
Please, Sign In to add comment