sebb        2004/07/02 19:30:19

  Modified:    src/protocol/http/org/apache/jmeter/protocol/http/sampler
                        PackageTest.java
  Log:
  Add test for new HTTP GUI
  
  Revision  Changes    Path
  1.4       +18 -6     
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/PackageTest.java
  
  Index: PackageTest.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/PackageTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PackageTest.java  12 Feb 2004 00:29:49 -0000      1.3
  +++ PackageTest.java  3 Jul 2004 02:30:19 -0000       1.4
  @@ -27,10 +27,10 @@
   import org.apache.jmeter.config.ConfigTestElement;
   import org.apache.jmeter.protocol.http.config.gui.HttpDefaultsGui;
   import org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui;
  +import org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui2;
   import org.apache.jmeter.protocol.http.util.HTTPArgument;
   
   /**
  - * @author ano ano
    * @version $Revision$ last updated $Date$
    */
   public class PackageTest extends TestCase
  @@ -42,14 +42,26 @@
   
       public void testConfiguring() throws Exception
       {
  -        HTTPSampler sampler =
  -            (HTTPSampler) new HttpTestSampleGui().createTestElement();
  +        HTTPSamplerBase sampler =
  +            (HTTPSamplerBase) new HttpTestSampleGui().createTestElement();
  +        configure(sampler);
  +    }
  +    
  +    public void testConfiguring2() throws Exception
  +    {
  +        HTTPSamplerBase sampler =
  +            (HTTPSamplerBase) new HttpTestSampleGui2().createTestElement();
  +        configure(sampler);
  +    }
  +    
  +    private void configure(HTTPSamplerBase sampler) throws Exception
  +    {
           sampler.addArgument("arg1", "val1");
           ConfigTestElement config =
               (ConfigTestElement) new HttpDefaultsGui().createTestElement();
           (
               (Arguments) config
  -                .getProperty(HTTPSampler.ARGUMENTS)
  +                .getProperty(HTTPSamplerBase.ARGUMENTS)
                   .getObjectValue())
                   .addArgument(
               new HTTPArgument("config1", "configValue"));
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to