01: package org.purl.sword.test;
02:
03: import org.purl.sword.server.SWORDServer;
04: import org.purl.sword.server.DummyServer;
05:
06: public class DummyServerTest {
07:
08: /**
09: * A main method to test the dummy SWORD server.
10: */
11: public static void main(String[] args) {
12: //Instantiate the dummy server
13: SWORDServer ss = new DummyServer();
14:
15: // Test the normal service document
16: System.out.println("Testing doServiceDocument():");
17: System.out.println("============================");
18: //System.out.println(ss.doServiceDocument(null));
19:
20: // Test the normal service document authenticated as 'sdl'
21: System.out.println("Testing doServiceDocument(sdl):");
22: System.out.println("============================");
23: //System.out.println(ss.doServiceDocument("sdl"));
24:
25: // Test the 'on behalf of' service document
26: System.out.println("Testing doServiceDocument(onBehalfOf):");
27: System.out.println("======================================");
28: //System.out.println(ss.doServiceDocument(null, "Stuart Lewis"));
29:
30: // Test the 'on behalf of' service document authenticated as 'sdl'
31: System.out
32: .println("Testing doServiceDocument(sdl, onBehalfOf):");
33: System.out.println("======================================");
34: //System.out.println(ss.doServiceDocument("sdl", "Stuart Lewis"));
35: }
36:
37: }
|