KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > view > jsp > model > test > ModelResolutionRegistryTest


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.verge.mvc.view.jsp.model.test;
8
9
10 import com.inversoft.junit.JspTestCase;
11 import com.inversoft.verge.mvc.model.MetaData;
12 import com.inversoft.verge.mvc.model.ModelResolution;
13 import com.inversoft.verge.mvc.model.form.FormMetaData;
14 import com.inversoft.verge.mvc.view.jsp.model.ModelResolutionRegistry;
15
16
17 /**
18  * <p>
19  * This class has the tests for the page meta data registry
20  * </p>
21  *
22  * @author Brian Pontarelli
23  * @since 2.0
24  * @version 2.0
25  */

26 public class ModelResolutionRegistryTest extends JspTestCase {
27
28     /**
29      * Constructor for ModelResolutionRegistryTest.
30      * @param name
31      */

32     public ModelResolutionRegistryTest(String JavaDoc name) {
33         super(name);
34         setLocal(true);
35     }
36
37
38     /**
39      * Tests everything
40      */

41     public void testAll() {
42         MetaData md = new FormMetaData("formBean", "test");
43         ModelResolution mr = new ModelResolution(new Object JavaDoc(), md);
44         ModelResolutionRegistry.store("testKey", mr, pageContext);
45         
46         assertEquals("Should be equal", mr,
47             ModelResolutionRegistry.lookup("testKey", pageContext));
48     }
49 }
50
Popular Tags