1   package org.codehaus.ivory.list;
2   
3   import org.codehaus.ivory.IvoryTestCase;
4   import org.dom4j.Document;
5   
6   /***
7    * Tests the ability to serialize lists as arrays.
8    * 
9    * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
10   * @since Mar 9, 2003
11   */
12  public class ListServiceTest
13      extends IvoryTestCase
14  {
15      public ListServiceTest(String name)
16      {
17          super(name);
18      }
19      
20      public void testListSerialization() throws Exception
21      {
22      	addNamespace("wsdl", "http://schemas.xmlsoap.org/wsdl/");
23          
24          Document doc = getWSDL("ListService");
25          
26          assertInvalid("/wsdl:definitions/wsdl:message[@name='secretMethodResponse']", doc );
27          assertValid("/wsdl:definitions/wsdl:message[@name='getDevelopersResponse']", doc );
28          assertValid("/wsdl:definitions/wsdl:message[@name='getDevelopersResponse']/wsdl:part[@type='impl:ArrayOf_xsd_string']", doc );
29  
30       }     
31  }
32