summaryrefslogtreecommitdiff
path: root/projects/net.wotonomy.web/src/test/java/net/wotonomy/web
diff options
context:
space:
mode:
authorBenjamin Culkin <scorpress@gmail.com>2024-05-20 17:58:16 -0400
committerBenjamin Culkin <scorpress@gmail.com>2024-05-20 17:58:16 -0400
commit40a9d99496e098562f090fb7ffce9e749011b131 (patch)
tree437df24d65470582e943e494a52db8ed65a881ae /projects/net.wotonomy.web/src/test/java/net/wotonomy/web
parentff072dfe782f6f22123cd4ba050828d35c0d0fbd (diff)
Formatting pass
Diffstat (limited to 'projects/net.wotonomy.web/src/test/java/net/wotonomy/web')
-rw-r--r--projects/net.wotonomy.web/src/test/java/net/wotonomy/web/xml/XMLRPCSelectorTest.java71
1 files changed, 31 insertions, 40 deletions
diff --git a/projects/net.wotonomy.web/src/test/java/net/wotonomy/web/xml/XMLRPCSelectorTest.java b/projects/net.wotonomy.web/src/test/java/net/wotonomy/web/xml/XMLRPCSelectorTest.java
index 989a7ff..726fcd0 100644
--- a/projects/net.wotonomy.web/src/test/java/net/wotonomy/web/xml/XMLRPCSelectorTest.java
+++ b/projects/net.wotonomy.web/src/test/java/net/wotonomy/web/xml/XMLRPCSelectorTest.java
@@ -1,6 +1,5 @@
package net.wotonomy.web.xml;
-
import java.io.Serializable;
import java.net.URL;
import java.util.Date;
@@ -21,49 +20,41 @@ public class XMLRPCSelectorTest extends TestCase {
super.tearDown();
}
- public static void testFoo( ) {
- try
- {
- // create url for server
- URL url = new URL( "http://localhost:8080/xmlrpctest" );
+ public static void testFoo() {
+ try {
+ // create url for server
+ URL url = new URL("http://localhost:8080/xmlrpctest");
- // set up selectors
- XMLRPCSelector getFullName =
- new XMLRPCSelector( "getFullName" );
- XMLRPCSelector getCreateDate =
- new XMLRPCSelector( "getCreateDate" );
- XMLRPCSelector setCreateDate =
- new XMLRPCSelector( "setCreateDate" );
- XMLRPCSelector getChildList =
- new XMLRPCSelector( "getChildList" );
- XMLRPCSelector setChildList =
- new XMLRPCSelector( "setChildList" );
+ // set up selectors
+ XMLRPCSelector getFullName = new XMLRPCSelector("getFullName");
+ XMLRPCSelector getCreateDate = new XMLRPCSelector("getCreateDate");
+ XMLRPCSelector setCreateDate = new XMLRPCSelector("setCreateDate");
+ XMLRPCSelector getChildList = new XMLRPCSelector("getChildList");
+ XMLRPCSelector setChildList = new XMLRPCSelector("setChildList");
- // fetch the full name
- System.out.println( getFullName.invoke( url ) );
+ // fetch the full name
+ System.out.println(getFullName.invoke(url));
- // fetch the create date
- System.out.println( getCreateDate.invoke( url ) );
- // set date to current time
- setCreateDate.invoke( url, new java.util.Date() );
- // re-fetch the create date
- System.out.println( getCreateDate.invoke( url ) );
+ // fetch the create date
+ System.out.println(getCreateDate.invoke(url));
+ // set date to current time
+ setCreateDate.invoke(url, new java.util.Date());
+ // re-fetch the create date
+ System.out.println(getCreateDate.invoke(url));
- // fetch the child list
- java.util.List childList = (java.util.List) getChildList.invoke( url );
- System.out.println( childList );
- // add a new child
- childList.add( new MockSerializableObject(new Long(5),"John","Doe", new Date()) );
- setChildList.invoke( url, childList );
- // re-fetch the child list
- System.out.println( getChildList.invoke( url ) );
- }
- catch (Exception exc)
- {
- //exc.printStackTrace();
+ // fetch the child list
+ java.util.List childList = (java.util.List) getChildList.invoke(url);
+ System.out.println(childList);
+ // add a new child
+ childList.add(new MockSerializableObject(new Long(5), "John", "Doe", new Date()));
+ setChildList.invoke(url, childList);
+ // re-fetch the child list
+ System.out.println(getChildList.invoke(url));
+ } catch (Exception exc) {
+ // exc.printStackTrace();
}
}
-
+
public static class MockSerializableObject implements Serializable {
public String firstname;
public String lastname;
@@ -77,7 +68,7 @@ public class XMLRPCSelectorTest extends TestCase {
this.id = id;
this.lastname = lastname;
}
-
+
}
-
+
}