1   /*
2    * Copyright (c) 2004-2005, University Health Network.  All rights reserved. Distributed under the BSD 
3    * license (see http://opensource.org/licenses/bsd-license.php).
4    *  
5    * DimensionTest.java
6    *
7    * Created on 9-Dec-2004 at 2:26:33 PM
8    */
9   package ca.uhn.cache.impl;
10  
11  import junit.framework.TestCase;
12  
13  
14  /***
15   * TODO complete javadoc for 
16   * 
17   * @author <a href="mailto:alexei.guevara@uhn.on.ca">Alexei Guevara</a>
18   * @version $Revision: 1.1 $ updated on $Date: 2005/01/24 22:51:47 $ by $Author: bryan_tripp $
19   */
20  public class DimensionTest extends TestCase {
21    
22      //enable assertions
23      static {
24          ClassLoader.getSystemClassLoader().setPackageAssertionStatus( "ca.uhn.cache", true );
25      }
26      
27      /***
28       */
29      public void test1() {
30          try {
31              Dimension d1 = new Dimension( null, new Class[] { Object.class } );
32              fail( "AssertionError must be thrown" );
33          }
34          catch ( AssertionError e ) {
35          }
36      }
37      
38      /***
39       */
40      public void test2() {
41          try {
42              Dimension d1 = new Dimension( "name", null );
43              fail( "AssertionError must be thrown" );
44          }
45          catch ( AssertionError e ) {
46          }
47      }
48      
49      /***
50       */
51      public void test3() {
52          String expectedName = "name";
53          Class[] expectedParamTypes = new Class[] { Object.class };
54          
55          Dimension d = new Dimension( expectedName, expectedParamTypes );
56          
57          assertEquals( expectedName, d.getName() );
58          assertEquals( expectedParamTypes, d.getParamTypes() );
59          
60      }
61      
62      
63      
64      
65  }
66