tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-tapestry/framework/src/test/org/apache/tapestry/components TestRenderBlock.java
Date Mon, 06 Dec 2004 13:39:46 GMT
hlship      2004/12/06 05:39:46

  Modified:    framework/src/test/org/apache/tapestry/junit
                        TestEngineServiceLink.java
               framework/src/test/org/apache/tapestry/components
                        TestRenderBlock.java
  Log:
  Take advantage of new class-mocking support in HiveMindTestCase.
  
  Revision  Changes    Path
  1.4       +2 -7      jakarta-tapestry/framework/src/test/org/apache/tapestry/junit/TestEngineServiceLink.java
  
  Index: TestEngineServiceLink.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/junit/TestEngineServiceLink.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestEngineServiceLink.java	5 Dec 2004 16:13:39 -0000	1.3
  +++ TestEngineServiceLink.java	6 Dec 2004 13:39:46 -0000	1.4
  @@ -24,7 +24,6 @@
   import org.apache.tapestry.request.RequestContext;
   import org.apache.tapestry.services.ServiceConstants;
   import org.easymock.MockControl;
  -import org.easymock.classextension.MockClassControl;
   
   /**
    * Tests for {@link org.apache.tapestry.engine.EngineServiceLink}.
  @@ -142,9 +141,7 @@
           MockControl control = newControl(IRequestCycle.class);
           IRequestCycle rc = (IRequestCycle) control.getMock();
   
  -        MockControl contextc = MockClassControl.createStrictControl(RequestContext.class);
  -        addControl(contextc);
  -
  +        MockControl contextc = newControl(RequestContext.class);
           RequestContext context = (RequestContext) contextc.getMock();
   
           rc.getRequestContext();
  @@ -174,9 +171,7 @@
           MockControl control = newControl(IRequestCycle.class);
           IRequestCycle rc = (IRequestCycle) control.getMock();
   
  -        MockControl contextc = MockClassControl.createStrictControl(RequestContext.class);
  -        addControl(contextc);
  -
  +        MockControl contextc = newControl(RequestContext.class);
           RequestContext context = (RequestContext) contextc.getMock();
   
           rc.getRequestContext();
  
  
  
  1.2       +2 -5      jakarta-tapestry/framework/src/test/org/apache/tapestry/components/TestRenderBlock.java
  
  Index: TestRenderBlock.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/components/TestRenderBlock.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestRenderBlock.java	5 Dec 2004 16:13:41 -0000	1.1
  +++ TestRenderBlock.java	6 Dec 2004 13:39:46 -0000	1.2
  @@ -19,7 +19,6 @@
   import org.apache.tapestry.IRequestCycle;
   import org.apache.tapestry.test.Creator;
   import org.easymock.MockControl;
  -import org.easymock.classextension.MockClassControl;
   
   /**
    * Tests for {@link org.apache.tapestry.components.RenderBlock}component.
  @@ -59,8 +58,7 @@
       {
           Creator c = new Creator();
   
  -        MockControl bc = MockClassControl.createStrictControl(Block.class);
  -        addControl(bc);
  +        MockControl bc = newControl(Block.class);
           Block b = (Block) bc.getMock();
   
           RenderBlock rb = (RenderBlock) c.newInstance(RenderBlock.class, new Object[]
  @@ -89,8 +87,7 @@
       {
           Creator c = new Creator();
   
  -        MockControl bc = MockClassControl.createStrictControl(Block.class);
  -        addControl(bc);
  +        MockControl bc = newControl(Block.class);
           Block b = (Block) bc.getMock();
   
           RenderBlock rb1 = (RenderBlock) c.newInstance(RenderBlock.class, new Object[]
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message