View Javadoc
1   package org.itracker.services.exceptions;
2   
3   import junit.framework.TestCase;
4   import org.itracker.PasswordException;
5   import org.junit.Test;
6   
7   public class PasswordExceptionTest extends TestCase {
8   
9       @Test
10      public void testConstructor() {
11          PasswordException e = new PasswordException();
12          assertTrue(e instanceof Exception);
13  
14          e = new PasswordException(1);
15          assertEquals("e.type", 1, e.getType());
16  
17      }
18  
19      @Test
20      public void testSetType() {
21          PasswordException e = new PasswordException();
22          e.setType(1);
23          assertEquals("e.type", 1, e.getType());
24      }
25  }