You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2001/06/13 00:26:54 UTC
cvs commit: xml-axis/java/test/session PackageTests.java TestSimpleSession.java
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();
}
}