Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DefaultConfiguration {
- public static BeanArchive create() {
- return ShrinkWrap.create("test.jar", BeanArchive.class)
- .addCurrentPackage();
- }
- }
- public class BasicDecoratorResolutionTest extends Arquillian
- {
- @Deployment()
- public static Archive<?> deploy()
- {
- return DefaultConfiguration.create().decorate(SimpleDecorator.class, ComplexDecorator.class);
- }
- @Test(dataProvider = ARQUILLIAN_DATA_PROVIDER)
- public void testBasicDecoratorInvocation(@Simple SimpleBean simpleBean)
- {
- String result = simpleBean.hello("world");
- assert "simple-Hello, world-simple".equals(result);
- }
- @Test(dataProvider = ARQUILLIAN_DATA_PROVIDER)
- public void testComplexDecoratorInvocation(@Complex ComplexBean complexBean)
- {
- String result = complexBean.hello("world");
- assert "simple-complex-Sophisticated Hello, world-complex-simple".equals(result);
- }
- }
Add Comment
Please, Sign In to add comment