axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/test/session PackageTests.java TestSimpleSession.java
Date Tue, 12 Jun 2001 22:26:54 GMT
gdaniels    01/06/12 15:26:54

  Added:       java/test/session PackageTests.java TestSimpleSession.java
  Log:
  Trivial tests for Session.  Will improve later.
  
  Revision  Changes    Path
  1.1                  xml-axis/java/test/session/PackageTests.java
  
  Index: PackageTests.java
  ===================================================================
  package test.session;
  
  import junit.framework.TestCase;
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  /**
   * Session tests
   */
  public class PackageTests extends TestCase {
  
      public PackageTests(String name) {
          super(name);
      }
  
      public static Test suite() throws Exception {
          TestSuite suite = new TestSuite();
  
          suite.addTestSuite(TestSimpleSession.class);
  
          return suite;
      }
  }
  
  
  
  1.1                  xml-axis/java/test/session/TestSimpleSession.java
  
  Index: TestSimpleSession.java
  ===================================================================
  package test.session;
  
  import org.apache.axis.session.SimpleSession;
  
  import junit.framework.TestCase;
  
  /** 
   * Test deserialization of SOAP responses
   */
  public class TestSimpleSession extends TestCase {
      public TestSimpleSession(String name)
      {
          super(name);
      }
      
      public void testSession() {
          SimpleSession session = new SimpleSession();
          Object val = new Float(5.6666);
          session.put("test", val);
          
          assertEquals(val, session.get("test"));
          
          session.remove("test");
          
          assertNull(session.get("test"));
          
      }
      
      public static void main(String args[])
      {
          TestSimpleSession test = new TestSimpleSession("test");
          test.testSession();
      }
  }
  
  
  

Mime
View raw message