From a579aca161da22d22f4ab8156c908c21325b63f6 Mon Sep 17 00:00:00 2001 From: pmarguerite Date: Fri, 15 Dec 2006 15:47:37 +0000 Subject: [PATCH] Added TestSessionURN: to test the creation of a sessionURN and to retrieve a correct file from it. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@325 be28352e-c001-0410-b1a7-c7978e42abec --- .../vamsas/test/simpleclient/TestSessionURN.java | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/uk/ac/vamsas/test/simpleclient/TestSessionURN.java diff --git a/src/uk/ac/vamsas/test/simpleclient/TestSessionURN.java b/src/uk/ac/vamsas/test/simpleclient/TestSessionURN.java new file mode 100644 index 0000000..e0759e2 --- /dev/null +++ b/src/uk/ac/vamsas/test/simpleclient/TestSessionURN.java @@ -0,0 +1,29 @@ +package uk.ac.vamsas.test.simpleclient; + +import java.io.File; + +import uk.ac.vamsas.client.simpleclient.SessionUrn; + +/** + * Tests simple client sessionURN creation + * + * + */ +public class TestSessionURN { + + public static void main (String [] arg) throws Exception + { + String file = null; + if (arg == null || arg.length ==0) + file = "."; + else + file = arg[0]; + + File f = new File (file); + SessionUrn urn = new SessionUrn(f); + System.out.println("urn "+urn.getSessionUrn()); + System.out.println("urn file "+ urn.asFile().getAbsolutePath()); + System.out.println("urn file exists?"+ urn.asFile().exists()); + } + +} -- 1.7.10.2