[jboss-cvs] jboss-seam/seam-gen/src ...

Gavin King gavin.king at jboss.com
Wed Nov 8 00:04:01 EST 2006


  User: gavin   
  Date: 06/11/08 00:04:01

  Added:       seam-gen/src    ActionTest.java FormTest.java
  Removed:     seam-gen/src    TestCase.java
  Log:
  more testing
  
  Revision  Changes    Path
  1.1      date: 2006/11/08 05:04:01;  author: gavin;  state: Exp;jboss-seam/seam-gen/src/ActionTest.java
  
  Index: ActionTest.java
  ===================================================================
  package @testPackage@;
  
  import org.testng.annotations.Test;
  import org.jboss.seam.mock.SeamTest;
  
  public class @interfaceName at Test extends SeamTest {
  
  	@Test
  	public void test() throws Exception {
  		new FacesRequest() {
  			@Override
  			protected void updateModelValues() throws Exception {				
  				//set form input to model attributes
  			}
  			@Override
  			protected void invokeApplication() {
  				//call action methods here
  				invokeMethod("#{@componentName at .@methodName@}");
  			}
  			@Override
  			protected void renderResponse() {
  				//check model attributes if needed
  			}
  		}.run();
  	}	
  }
  
  
  
  1.1      date: 2006/11/08 05:04:01;  author: gavin;  state: Exp;jboss-seam/seam-gen/src/FormTest.java
  
  Index: FormTest.java
  ===================================================================
  package @testPackage@;
  
  import org.testng.annotations.Test;
  import org.jboss.seam.mock.SeamTest;
  
  public class @interfaceName at Test extends SeamTest {
  
  	@Test
  	public void test() throws Exception {
  		new FacesRequest() {
  			@Override
  			protected void updateModelValues() throws Exception {				
  				//set form input to model attributes
              setValue("#{@componentName at .value}", "seam");
  			}
  			@Override
  			protected void invokeApplication() {
  				//call action methods here
  				invokeMethod("#{@componentName at .@methodName@}");
  			}
  			@Override
  			protected void renderResponse() {
  				//check model attributes if needed
              assert getValue("#{@componentName at .value}").equals("seam");
  			}
  		}.run();
  	}	
  }
  
  
  



More information about the jboss-cvs-commits mailing list