Index: trunk/testsrc/ws/fugue88/ContextTest.java
===================================================================
--- trunk/testsrc/ws/fugue88/ContextTest.java	(revision 5)
+++ trunk/testsrc/ws/fugue88/ContextTest.java	(revision 6)
@@ -3,4 +3,8 @@
  * 
  * $Log$
+ * Revision 1.2  2005/09/21 22:00:46  dsowen
+ * Split out the access stuff into accesslib.
+ * New Creator interface off-loads object creation to user.
+ *
  * Revision 1.1  2005/08/19 17:51:17  dsowen
  * Fixed: NPEs when using accessors from paths, &c.  Included tests.
@@ -19,8 +23,9 @@
 
 import junit.framework.TestCase;
-import ws.fugue88.jpath.Accessor;
+import ws.fugue88.access.Accessor;
 import ws.fugue88.jpath.Context;
 import ws.fugue88.jpath.ContextFactory;
-import ws.fugue88.jpath.Path;
+import ws.fugue88.jpath.GraphCreator;
+import ws.fugue88.jpath.SimplePathParser;
 
 /**
@@ -38,8 +43,8 @@
 
 		ContextFactory factory = new ContextFactory();
-		Context context = factory.createContext(a);
-		assertSame(a.b, context.getTarget(new Path("/b")));
-
-		Accessor accessor = context.getTargetAccessor(new Path("/b"));
+		Context context = factory.createContext(a, GraphCreator.NULL);
+		assertSame(a.b, context.getTarget(new SimplePathParser().parse("/b")));
+
+		Accessor accessor = context.getTargetAccessor(new SimplePathParser().parse("/b"));
 		assertSame(a.b, accessor.getValue());
 		accessor.setValue("done");
@@ -60,8 +65,10 @@
 
 		ContextFactory factory = new ContextFactory();
-		Context context = factory.createContext(a);
-		assertEquals("test", context.getTarget(new Path("/b")));
+		Context context = factory.createContext(a, GraphCreator.NULL);
+		assertEquals("test",
+				context.getTarget(new SimplePathParser().parse("/b")));
 		try {
-			context.getTargetAccessor(new Path("/b")).setValue("done");
+			context.getTargetAccessor(new SimplePathParser().parse("/b")).setValue(
+					"done");
 			assertTrue(false);
 		} catch(UnsupportedOperationException e) {}
@@ -87,7 +94,9 @@
 
 		ContextFactory factory = new ContextFactory();
-		Context context = factory.createContext(a);
-		assertEquals("test", context.getTarget(new Path("/b")));
-		context.getTargetAccessor(new Path("/b")).setValue("done");
+		Context context = factory.createContext(a, GraphCreator.NULL);
+		assertEquals("test",
+				context.getTarget(new SimplePathParser().parse("/b")));
+		context.getTargetAccessor(new SimplePathParser().parse("/b")).setValue(
+				"done");
 		assertEquals("done", a.getB());
 	}
@@ -107,7 +116,9 @@
 
 		ContextFactory factory = new ContextFactory();
-		Context context = factory.createContext(a);
-		assertEquals("test", context.getTarget(new Path("/b['c']")));
-		context.getTargetAccessor(new Path("/b['c']")).setValue("done");
+		Context context = factory.createContext(a, GraphCreator.NULL);
+		assertEquals("test",
+				context.getTarget(new SimplePathParser().parse("/b['c']")));
+		context.getTargetAccessor(new SimplePathParser().parse("/b['c']")).setValue(
+				"done");
 		assertEquals("done", a.b.get("c"));
 	}
@@ -126,6 +137,6 @@
 
 		ContextFactory factory = new ContextFactory();
-		Context context = factory.createContext(b);
-		assertNull(context.getTarget(new Path("/a/s")));
+		Context context = factory.createContext(b, GraphCreator.NULL);
+		assertNull(context.getTarget(new SimplePathParser().parse("/a/s")));
 		assertNull(b.a);
 	}
@@ -145,6 +156,6 @@
 
 		ContextFactory factory = new ContextFactory();
-		Context context = factory.createModifyingContext(b);
-		assertNull(context.getTarget(new Path("/a/s")));
+		Context context = factory.createContext(b, GraphCreator.DEFAULT);
+		assertNull(context.getTarget(new SimplePathParser().parse("/a/s")));
 		assertNotNull(b.a);
 		assertNull(b.a.s);
@@ -160,6 +171,6 @@
 
 		ContextFactory factory = new ContextFactory();
-		Context context = factory.createModifyingContext(b);
-		Accessor accessor = context.getTargetAccessor(new Path("/a/s"));
+		Context context = factory.createContext(b, GraphCreator.DEFAULT);
+		Accessor accessor = context.getTargetAccessor(new SimplePathParser().parse("/a/s"));
 		assertNotNull(b.a);
 		assertNull(b.a.s);
@@ -184,6 +195,6 @@
 
 		ContextFactory factory = new ContextFactory();
-		Context context = factory.createModifyingContext(b);
-		assertNull(context.getTarget(new Path("/x/s")));
+		Context context = factory.createContext(b, GraphCreator.DEFAULT);
+		assertNull(context.getTarget(new SimplePathParser().parse("/x/s")));
 		assertNotNull(b.x);
 		assertNull(b.x.s);
Index: trunk/testsrc/ws/fugue88/jpath/PathTest.java
===================================================================
--- trunk/testsrc/ws/fugue88/jpath/PathTest.java	(revision 5)
+++ trunk/testsrc/ws/fugue88/jpath/PathTest.java	(revision 6)
@@ -3,4 +3,8 @@
  * 
  * $Log$
+ * Revision 1.2  2005/09/21 22:00:46  dsowen
+ * Split out the access stuff into accesslib.
+ * New Creator interface off-loads object creation to user.
+ *
  * Revision 1.1  2005/08/03 00:35:29  dsowen
  * Initial commit.
@@ -20,11 +24,11 @@
 	public void testQuote()
 	{
-		assertEquals("test", Path.quote("test"));
-		assertEquals("te\\'st", Path.quote("te'st"));
+		assertEquals("test", PathParser.quote("test"));
+		assertEquals("te\\'st", PathParser.quote("te'st"));
 	}
 
 	public void testIdentifier() throws Exception
 	{
-		Path path = new Path("/test");
+		Path path = new SimplePathParser().parse("/test");
 		Iterator i = path.iterator();
 		PathPart part = (PathPart)i.next();
@@ -36,5 +40,5 @@
 	public void testNumberSelector() throws Exception
 	{
-		Path path = new Path("[0]");
+		Path path = new SimplePathParser().parse("[0]");
 		Iterator i = path.iterator();
 		PathPart part = (PathPart)i.next();
@@ -46,5 +50,5 @@
 	public void testStringSelectorSimple() throws Exception
 	{
-		Path path = new Path("['test']");
+		Path path = new SimplePathParser().parse("['test']");
 		Iterator i = path.iterator();
 		PathPart part = (PathPart)i.next();
@@ -56,5 +60,5 @@
 	public void testStringSelectorQuoted() throws Exception
 	{
-		Path path = new Path("['te\\'st']");
+		Path path = new SimplePathParser().parse("['te\\'st']");
 		Iterator i = path.iterator();
 		PathPart part = (PathPart)i.next();
@@ -63,7 +67,8 @@
 		assertFalse(i.hasNext());
 	}
+
 	public void testCompound1() throws Exception
 	{
-		Path path = new Path("/a/b");
+		Path path = new SimplePathParser().parse("/a/b");
 		Iterator i = path.iterator();
 		PathPart part = (PathPart)i.next();
