KickJava   Java API By Example, From Geeks To Geeks.

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


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.verge.mvc.model.DefaultModelParser;
11 import com.inversoft.verge.mvc.model.web.WebMetaData;
12
13
14 /**
15  * <p>
16  * This class has toolkit methods for helping test the model
17  * tag library.
18  * </p>
19  *
20  * @author Brian Pontarelli
21  * @since 2.0
22  * @version 2.0
23  */

24 public class TestTools {
25
26     public static String JavaDoc createWebLink(String JavaDoc def, String JavaDoc className, int scope) {
27         return "<input type=\"hidden\" name=\"" + DefaultModelParser.INPUT_PARAMETER +
28             "\" value=\"test|web|" + def + "|" + WebMetaData.CLASS_PARAMETER +
29             "=" + className + "|" + WebMetaData.SCOPE_PARAMETER + "=" + scope + "\"/>";
30     }
31
32     public static String JavaDoc createWebParam(String JavaDoc name, String JavaDoc def, String JavaDoc className,
33             int scope) {
34         return DefaultModelParser.INPUT_PARAMETER + "=" + name + "|web|" +
35             def + "|" + WebMetaData.CLASS_PARAMETER + "=" + className + "|" +
36             WebMetaData.SCOPE_PARAMETER + "=" + scope;
37     }
38 }
Popular Tags