Skip to content

Commit

Permalink
Enabling unit tests for WELD-333.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbogoevici committed Dec 19, 2009
1 parent 983bbdb commit 0063bd6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
Expand Up @@ -30,7 +30,7 @@
public class PartialDecoratorTest extends AbstractWeldTest
{

@Test(groups = "broken")
@Test
public void testDecoratorDoesNotDecorateOutsideDecoratedTypes()
{
TestBean testBean = getCurrentManager().getInstanceByType(TestBean.class);
Expand Down
Expand Up @@ -30,9 +30,9 @@ public class PartialDecorator<T> implements Decorated<T>

@Inject @Delegate GenericBean<T> delegate;

static boolean decoratedInvoked;
static boolean decoratedInvoked = false;

static boolean notDecoratedInvoked;
static boolean notDecoratedInvoked = false;

public T decoratedEcho(T parameter)
{
Expand Down
Expand Up @@ -30,15 +30,16 @@
public class PartialDecoratorTest extends AbstractWeldTest
{

@Test(groups = "broken")
@Test
public void testDecoratorDoesNotDecorateOutsideDecoratedTypes()
{
TestBean testBean = getCurrentManager().getInstanceByType(TestBean.class);
testBean.invoke();

assert PartialDecorator.decoratedInvoked;
assert !PartialDecorator.notDecoratedInvoked;
assert AnotherPartialDecorator.invoked;
assert StringPartialDecorator.invoked;
assert !IntegerPartialDecorator.invoked;
assert GenericBean.decoratedInvoked;
assert GenericBean.notDecoratedInvoked;
}
Expand Down
Expand Up @@ -25,13 +25,13 @@
* @author Marius Bogoevici
*/
@Decorator
public class AnotherPartialDecorator implements Decorated<String>
public class StringPartialDecorator implements Decorated<String>
{
@Inject
@Delegate
GenericBean<String> delegate;

static boolean invoked = true;
static boolean invoked = false;

public String decoratedEcho(String parameter)
{
Expand Down
@@ -1,6 +1,6 @@
<beans>
<decorators>
<decorator>org.jboss.weld.tests.decorators.generic.PartialDecorator</decorator>
<decorator>org.jboss.weld.tests.decorators.generic.AnotherPartialDecorator</decorator>
<decorator>org.jboss.weld.tests.decorators.generic.StringPartialDecorator</decorator>
</decorators>
</beans>

0 comments on commit 0063bd6

Please sign in to comment.