⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 verifytestcase.java

📁 Java有关XML编程需要用到axis 的源代码 把里面bin下的包导入相应的Java工程 进行使用
💻 JAVA
字号:
package test.wsdl.opStyles;import java.lang.reflect.Method;import java.util.Vector;// This test makes sure that the OpStyles interface ONLY has oneway and// requestResponse methods and that no other methods, particularly// solicitResponse and notification, exist.public class VerifyTestCase extends junit.framework.TestCase {    public VerifyTestCase(String name) {        super(name);    }    public void testOpStyles() {        Method[] methods =                test.wsdl.opStyles.OpStyles.class.getDeclaredMethods();        boolean sawOneway = false;        boolean sawRequestResponse = false;        boolean sawSolicitResponse = false;        boolean sawNotification = false;        Vector  others = new Vector();        for (int i = 0; i < methods.length; ++i) {            String name = methods[i].getName();            if ("oneway".equals(name)) {                sawOneway = true;            }            else if ("requestResponse".equals(name)) {                sawRequestResponse = true;            }            else {                others.add(name);            }        }        assertTrue("Expected method oneWay does not exist on OpStyles", sawOneway == true);        assertTrue("Expected method requestResponse does not exist on OpStyles",                sawRequestResponse == true);        if (others.size() > 0) {            String message = "Methods exist on OpStyles but should not:  ";            boolean needComma = false;            for (int i = 0; i < others.size(); ++i) {                if (needComma) {                    message += ", ";                }                else {                    needComma = true;                }                message += (String) others.get(i);            }        }    } // testOpStyles} // class VerifyTestCase

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -