You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2003/03/21 20:09:13 UTC

cvs commit: jakarta-tapestry/junit/src/org/apache/tapestry/junit TestBindings.java

hlship      2003/03/21 11:09:12

  Modified:    junit/src/org/apache/tapestry/junit TestBindings.java
  Log:
  Fill in code coverage gap in StringBinding.
  
  Revision  Changes    Path
  1.3       +15 -1     jakarta-tapestry/junit/src/org/apache/tapestry/junit/TestBindings.java
  
  Index: TestBindings.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/junit/src/org/apache/tapestry/junit/TestBindings.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestBindings.java	15 Mar 2003 21:22:23 -0000	1.2
  +++ TestBindings.java	21 Mar 2003 19:09:12 -0000	1.3
  @@ -62,6 +62,7 @@
   import org.apache.tapestry.ApplicationRuntimeException;
   import org.apache.tapestry.BindingException;
   import org.apache.tapestry.IBinding;
  +import org.apache.tapestry.IComponent;
   import org.apache.tapestry.IPage;
   import org.apache.tapestry.IRequestCycle;
   import org.apache.tapestry.IResourceResolver;
  @@ -70,6 +71,7 @@
   import org.apache.tapestry.binding.FieldBinding;
   import org.apache.tapestry.binding.ListenerBinding;
   import org.apache.tapestry.binding.StaticBinding;
  +import org.apache.tapestry.binding.StringBinding;
   import org.apache.tapestry.util.DefaultResourceResolver;
   
   /**
  @@ -714,5 +716,17 @@
           IBinding b = new ListenerBinding(null, null, null, null);
   
           assertSame(b, b.getObject());
  +    }
  +    
  +    /** @since 2.4 **/
  +    
  +    public void testStringBinding()
  +    {
  +    	IComponent c = new MockPage();
  +    	
  +    	StringBinding b = new StringBinding(c, "foo", null);
  +    	
  +    	assertSame(c, b.getComponent());
  +    	assertEquals("foo", b.getKey());
       }
   }