1   package org.codehaus.xfire.aegis.test;
2   
3   import java.util.ArrayList;
4   import java.util.HashMap;
5   import java.util.List;
6   import java.util.Map;
7   
8   import junit.framework.Assert;
9   
10  /***
11   * BookService
12   * 
13   * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
14   */
15  public class TestService
16      extends Assert
17  {
18  	public Map EmptyRequest(Map mapContext)
19  	{
20          HashMap results = new HashMap();
21          results.put("test", "test");
22  
23          return results;
24  	}
25      
26      public Map EmptyResponse(Map mapContext)
27      {
28          HashMap results = new HashMap();
29          return results;
30      }
31  
32      public Map HeaderTest(Map mapContext)
33      {
34          return mapContext;
35      }
36      
37      public Map PrimitiveTest(Map mapContext)
38      {
39          Long l = (Long) mapContext.get("long");
40          assertNotNull(l);
41          assertEquals( 10, l.longValue() );
42          
43          Integer i = (Integer) mapContext.get("int");
44          assertNotNull(i);
45          assertEquals( 10, i.intValue() );
46          
47          String s = (String) mapContext.get("string");
48          assertNotNull(s);
49          assertEquals( "bleh", s );
50          
51          return mapContext;
52      }
53      
54      public Map GetFlatArray(Map mapContext)
55      {
56          List array = new ArrayList();
57          array.add("hi");
58          array.add("ho");
59          
60          HashMap results = new HashMap();
61          results.put("array", array);
62          return results;
63      }
64  }