01: package com.sun.portal.wireless.taglibs.util;
02:
03: import java.net.*;
04: import java.util.*;
05: import junit.framework.*;
06: import com.sun.portal.wireless.tests.*;
07: import java.lang.reflect.Method;
08:
09: //
10: // Test Goal: Verify that the BeansTag getSize() and setSize() methods return/pass compatible
11: // values. This is to enforce a workaround for web container implementation
12: // inconsistencies.
13: //
14:
15: public class TestBeansTag extends TestCase {
16:
17: static final String BEANS_TAG_CLASS_NAME = "com.sun.portal.wireless.taglibs.util.BeansTag";
18:
19: public void testAttributeDeclaration() {
20: try {
21: Class beansTagClass = Class.forName(BEANS_TAG_CLASS_NAME);
22: Class[] argClassArray = { Class.forName("java.lang.String") };
23: Method setSizeMethod = beansTagClass.getMethod("setSize",
24: argClassArray);
25: Method getSizeMethod = beansTagClass.getMethod("getSize",
26: null);
27: Class getSizeReturnType = getSizeMethod.getReturnType();
28: assertEquals("java.lang.String", getSizeReturnType
29: .getName());
30: } catch (Exception e) {
31: TestUtils.fail(this, e);
32: }
33: }
34:
35: }
|