Skip to content

Commit

Permalink
Rename constant
Browse files Browse the repository at this point in the history
The helps make it more clear after the API change from ASC / DESC to BREADTH / DEPTH FIRST
  • Loading branch information
LightGuard committed Jan 2, 2011
1 parent 0e3145c commit b2e003d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc., and individual contributors
* Copyright 2011, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
Expand All @@ -25,18 +25,18 @@
@HandlesExceptions
public class UnMuteHandler
{
public static int ASC_NUMBER_CALLED = 0;
public static int DESC_NUMBER_CALLED = 0;
public static int DEPTH_FIRST_NUMBER_CALLED = 0;
public static int BREADTH_FIRST_NUMBER_CALLED = 0;

public void unMuteHandlerAsc(@Handles CaughtException<Exception> event)
{
ASC_NUMBER_CALLED++;
DEPTH_FIRST_NUMBER_CALLED++;
event.unmute();
}

public void unMuteHandlerDesc(@Handles(during = TraversalMode.BREADTH_FIRST) CaughtException<Exception> event)
{
DESC_NUMBER_CALLED++;
BREADTH_FIRST_NUMBER_CALLED++;
event.unmute();
}
}
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc., and individual contributors
* Copyright 2011, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
Expand Down Expand Up @@ -56,7 +56,7 @@ public void assertCorrectNumberOfCallsForUnMute()
{
bm.fireEvent(new ExceptionToCatch(new Exception(new NullPointerException())));

assertEquals(2, UnMuteHandler.ASC_NUMBER_CALLED);
assertEquals(2, UnMuteHandler.DESC_NUMBER_CALLED);
assertEquals(2, UnMuteHandler.DEPTH_FIRST_NUMBER_CALLED);
assertEquals(2, UnMuteHandler.BREADTH_FIRST_NUMBER_CALLED);
}
}

0 comments on commit b2e003d

Please sign in to comment.