Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.acme;
- public class DefaultConfiguration {
- @Deployment
- public static Archive<?> deploy() {
- return ShrinkWrap.create("test.jar", BeanArchive.class)
- .addCurrentPackage();
- }
- }
- package com.acme.foo;
- public class BasicDecoratorResolutionTest extends Arquillian
- {
- @Deployment(basedOn=DefaultConfiguration.class)
- public static Archive<?> deploy(BeanArchive archive)
- {
- return archive.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