Index: trunk/testsrc/ws/fugue88/jpath/ContextTest.java
===================================================================
--- trunk/testsrc/ws/fugue88/jpath/ContextTest.java	(revision 2)
+++ trunk/testsrc/ws/fugue88/jpath/ContextTest.java	(revision 4)
@@ -3,4 +3,7 @@
  * 
  * $Log$
+ * Revision 1.2  2005/08/12 19:01:46  dsowen
+ * Feature: can automatically fill missing parts of a graph.
+ *
  * Revision 1.1  2005/08/03 00:35:29  dsowen
  * Initial commit.
@@ -101,3 +104,41 @@
 		assertEquals("done", a.b.get("c"));
 	}
+
+	public void testEarlyNull() throws Exception
+	{
+		class A {
+
+			String s;
+		}
+		class B {
+
+			A a;
+		}
+		B b = new B();
+
+		ContextFactory factory = new ContextFactory();
+		Context context = factory.createContext(b);
+		assertNull(context.getTarget(new Path("/a/s")));
+		assertNull(b.a);
+	}
+
+	static class A {
+
+		String s;
+	}
+
+	public void testAutoGraph() throws Exception
+	{
+		class B {
+
+			A a;
+		}
+		B b = new B();
+
+		ContextFactory factory = new ContextFactory();
+		Context context = factory.createModifyingContext(b);
+		assertNull(context.getTarget(new Path("/a/s")));
+		assertNotNull(b.a);
+		assertNull(b.a.s);
+	}
 }
