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

📄 soapbindingannotationtest.java

📁 Xfire文件 用于开发web service 的一个开源工具 很好用的
💻 JAVA
字号:
package org.codehaus.xfire.annotations.soap;import junit.framework.TestCase;import org.codehaus.xfire.soap.SoapConstants;public class SOAPBindingAnnotationTest        extends TestCase{    private SOAPBindingAnnotation soapBindingAnnotation;    protected void setUp()            throws Exception    {        soapBindingAnnotation = new SOAPBindingAnnotation();    }    public void testSetStyle()            throws Exception    {        try        {            soapBindingAnnotation.setStyle(999);            fail("No IllegalArgumentException thrown");        }        catch (IllegalArgumentException e)        {            // expected behavior        }    }    public void testSetUse()            throws Exception    {        try        {            soapBindingAnnotation.setUse(999);            fail("No IllegalArgumentException thrown");        }        catch (IllegalArgumentException e)        {            // expected behavior        }    }    public void testSetParameterStyle()            throws Exception    {        try        {            soapBindingAnnotation.setParameterStyle(999);            fail("No IllegalArgumentException thrown");        }        catch (IllegalArgumentException e)        {            // expected behavior        }    }    public void testGetStyleString()            throws Exception    {        soapBindingAnnotation.setParameterStyle(SOAPBindingAnnotation.PARAMETER_STYLE_WRAPPED);        soapBindingAnnotation.setStyle(SOAPBindingAnnotation.STYLE_DOCUMENT);        assertEquals(SoapConstants.STYLE_WRAPPED, soapBindingAnnotation.getStyleString());        soapBindingAnnotation.setParameterStyle(SOAPBindingAnnotation.PARAMETER_STYLE_BARE);        assertEquals(SoapConstants.STYLE_DOCUMENT, soapBindingAnnotation.getStyleString());        soapBindingAnnotation.setStyle(SOAPBindingAnnotation.STYLE_RPC);        assertEquals(SoapConstants.STYLE_RPC, soapBindingAnnotation.getStyleString());    }    public void testGetUseString()            throws Exception    {        soapBindingAnnotation.setUse(SOAPBindingAnnotation.USE_ENCODED);        assertEquals(SoapConstants.USE_ENCODED, soapBindingAnnotation.getUseString());        soapBindingAnnotation.setUse(SOAPBindingAnnotation.USE_LITERAL);        assertEquals(SoapConstants.USE_LITERAL, soapBindingAnnotation.getUseString());    }}

⌨️ 快捷键说明

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