dion 02/05/15 00:16:57
Modified: src/test/org/apache/maven/j2ee
ValidationBroadcasterTest.java
Log:
Fixed checkstyle issues
Revision Changes Path
1.3 +57 -20
jakarta-turbine-maven/src/test/org/apache/maven/j2ee/ValidationBroadcasterTest.java
Index: ValidationBroadcasterTest.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/test/org/apache/maven/j2ee/ValidationBroadcasterTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ValidationBroadcasterTest.java 15 May 2002 05:46:51 -0000 1.2
+++ ValidationBroadcasterTest.java 15 May 2002 07:16:57 -0000 1.3
@@ -60,7 +60,7 @@
* Test cases for the {@link ValidationBroadcaster}
*
* @author <a href="mailto:[EMAIL PROTECTED]">dIon Gillard</a>
- * @version $Id: ValidationBroadcasterTest.java,v 1.2 2002/05/15 05:46:51 dion Exp $
+ * @version $Id: ValidationBroadcasterTest.java,v 1.3 2002/05/15 07:16:57 dion Exp $
*/
public class ValidationBroadcasterTest extends TestCase
{
@@ -84,9 +84,9 @@
*/
public void setUp() throws Exception
{
- instance = new ValidationBroadcaster();
- status = new ValidationStatusListener();
- instance.addValidationListener(status);
+ setInstance(new ValidationBroadcaster());
+ setStatus(new ValidationStatusListener());
+ getInstance().addValidationListener(getStatus());
}
/**
@@ -95,10 +95,11 @@
*/
public void testStartedBroadcast() throws Exception
{
- assertTrue("status was started before starting", !status.isStarted());
- instance.fireStartedEvent(new ValidationEvent(this));
+ assertTrue("status was started before starting",
+ !getStatus().isStarted());
+ getInstance().fireStartedEvent(new ValidationEvent(this));
assertTrue("status was not started after broadcast",
- status.isStarted());
+ getStatus().isStarted());
}
/**
@@ -107,10 +108,11 @@
*/
public void testErrorBroadcast() throws Exception
{
- assertTrue("status was error before starting", !status.isError());
- instance.fireErrorEvent(new ValidationEvent(this));
+ assertTrue("status was error before starting",
+ !getStatus().isError());
+ getInstance().fireErrorEvent(new ValidationEvent(this));
assertTrue("status was not error after broadcast",
- status.isError());
+ getStatus().isError());
}
/**
@@ -119,10 +121,11 @@
*/
public void testWarningBroadcast() throws Exception
{
- assertTrue("status was warning before starting", !status.isWarning());
- instance.fireWarningEvent(new ValidationEvent(this));
+ assertTrue("status was warning before starting",
+ !getStatus().isWarning());
+ getInstance().fireWarningEvent(new ValidationEvent(this));
assertTrue("status was not warning after broadcast",
- status.isWarning());
+ getStatus().isWarning());
}
/**
@@ -131,10 +134,11 @@
*/
public void testEndedBroadcast() throws Exception
{
- assertTrue("status was ended before starting", !status.isEnded());
- instance.fireEndedEvent(new ValidationEvent(this));
+ assertTrue("status was ended before starting",
+ !getStatus().isEnded());
+ getInstance().fireEndedEvent(new ValidationEvent(this));
assertTrue("status was not ended after broadcast",
- status.isEnded());
+ getStatus().isEnded());
}
/**
@@ -143,10 +147,43 @@
*/
public void testRemoveListener() throws Exception
{
- assertTrue("status was started before starting", !status.isStarted());
- instance.removeValidationListener(status);
- instance.fireStartedEvent(new ValidationEvent(this));
- assertTrue("event received after removing", !status.isStarted());
+ assertTrue("status was started before starting",
+ !getStatus().isStarted());
+ getInstance().removeValidationListener(getStatus());
+ getInstance().fireStartedEvent(new ValidationEvent(this));
+ assertTrue("event received after removing", !getStatus().isStarted());
}
+ /** Getter for property instance.
+ * @return Value of property instance.
+ */
+ private ValidationBroadcaster getInstance()
+ {
+ return instance;
+ }
+
+ /** Setter for property instance.
+ * @param instance New value of property instance.
+ */
+ private void setInstance(ValidationBroadcaster instance)
+ {
+ this.instance = instance;
+ }
+
+ /** Getter for property status.
+ * @return Value of property status.
+ */
+ private ValidationStatusListener getStatus()
+ {
+ return status;
+ }
+
+ /** Setter for property status.
+ * @param status New value of property status.
+ */
+ private void setStatus(ValidationStatusListener status)
+ {
+ this.status = status;
+ }
+
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>