KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > jwebunit > util > ListTesterAsserts


1 /********************************************************************************
2  * Copyright (c) 2001, ThoughtWorks, Inc.
3  * Distributed open-source, see full license under licenses/jwebunit_license.txt
4 **********************************/

5 package net.sourceforge.jwebunit.util;
6
7 import net.sourceforge.jwebunit.WebTester;
8
9 import java.lang.reflect.Method JavaDoc;
10
11 public class ListTesterAsserts {
12     public static void main(String JavaDoc[] args) {
13         Method JavaDoc[] methods = WebTester.class.getMethods();
14         for (int i = 0; i < methods.length; i++) {
15             Method JavaDoc method = methods[i];
16             if (method.getName().startsWith("assert")) {
17                 Class JavaDoc[] argTypes = method.getParameterTypes();
18                 String JavaDoc classes = "(";
19                 for (int j = 0; j < argTypes.length; j++) {
20                     Class JavaDoc argType = argTypes[j];
21                     classes += argType.getName();
22                     if (j != argTypes.length - 1) {
23                         classes += ", ";
24                     }
25                 }
26                 classes += ")";
27                 System.out.println(method.getName() + classes);
28             }
29         }
30     }
31 }
32
Popular Tags