dion        02/05/14 22:46:51

  Modified:    src/test/org/apache/maven/j2ee
                        ValidationBroadcasterTest.java
  Log:
  no message
  
  Revision  Changes    Path
  1.2       +54 -1     
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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ValidationBroadcasterTest.java    15 May 2002 05:06:56 -0000      1.1
  +++ ValidationBroadcasterTest.java    15 May 2002 05:46:51 -0000      1.2
  @@ -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.1 2002/05/15 05:06:56 dion Exp $
  + * @version $Id: ValidationBroadcasterTest.java,v 1.2 2002/05/15 05:46:51 dion Exp $
    */
   public class ValidationBroadcasterTest extends TestCase
   {
  @@ -89,6 +89,10 @@
           instance.addValidationListener(status);
       }
       
  +    /**
  +     * test that the fireStartedEvent method works
  +     * @throws Exception when there is an unexpected problem
  +     */
       public void testStartedBroadcast() throws Exception
       {
           assertTrue("status was started before starting", !status.isStarted());
  @@ -96,4 +100,53 @@
           assertTrue("status was not started after broadcast", 
               status.isStarted());
       }
  +
  +    /**
  +     * test that the fireErrorEvent method works
  +     * @throws Exception when there is an unexpected problem
  +     */
  +    public void testErrorBroadcast() throws Exception
  +    {
  +        assertTrue("status was error before starting", !status.isError());
  +        instance.fireErrorEvent(new ValidationEvent(this));
  +        assertTrue("status was not error after broadcast", 
  +            status.isError());
  +    }
  +
  +    /**
  +     * test that the fireErrorEvent method works
  +     * @throws Exception when there is an unexpected problem
  +     */
  +    public void testWarningBroadcast() throws Exception
  +    {
  +        assertTrue("status was warning before starting", !status.isWarning());
  +        instance.fireWarningEvent(new ValidationEvent(this));
  +        assertTrue("status was not warning after broadcast", 
  +            status.isWarning());
  +    }
  +
  +    /**
  +     * test that the fireEndedEvent method works
  +     * @throws Exception when there is an unexpected problem
  +     */
  +    public void testEndedBroadcast() throws Exception
  +    {
  +        assertTrue("status was ended before starting", !status.isEnded());
  +        instance.fireEndedEvent(new ValidationEvent(this));
  +        assertTrue("status was not ended after broadcast", 
  +            status.isEnded());
  +    }
  +    
  +    /**
  +     * test that the removeValidationListeners method works
  +     * @throws Exception when there is an unexpected problem
  +     */
  +    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());
  +    }
  +
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to