jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1380341 - in /jmeter/trunk/test/src/org/apache/jmeter/assertions: ResponseAssertionTest.java SizeAssertionTest.java
Date Mon, 03 Sep 2012 20:13:43 GMT
Author: pmouawad
Date: Mon Sep  3 20:13:43 2012
New Revision: 1380341

URL: http://svn.apache.org/viewvc?rev=1380341&view=rev
Log:
Make field final
Make field local

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/assertions/ResponseAssertionTest.java
    jmeter/trunk/test/src/org/apache/jmeter/assertions/SizeAssertionTest.java

Modified: jmeter/trunk/test/src/org/apache/jmeter/assertions/ResponseAssertionTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/assertions/ResponseAssertionTest.java?rev=1380341&r1=1380340&r2=1380341&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/assertions/ResponseAssertionTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/assertions/ResponseAssertionTest.java Mon Sep
 3 20:13:43 2012
@@ -33,19 +33,17 @@ public class ResponseAssertionTest  exte
     public ResponseAssertionTest() {
     }
 
-    private JMeterContext jmctx;
     private ResponseAssertion assertion;
     private SampleResult sample;
-    private JMeterVariables vars;
     private AssertionResult result;
     
     @Override
     public void setUp() throws MalformedURLException {
-        jmctx = JMeterContextService.getContext();
+        JMeterContext jmctx = JMeterContextService.getContext();
         assertion = new ResponseAssertion();
         assertion.setThreadContext(jmctx);
         sample = new SampleResult();
-        vars = new JMeterVariables();
+        JMeterVariables vars = new JMeterVariables();
         jmctx.setVariables(vars);
         jmctx.setPreviousResult(sample);
         sample.setResponseData("response Data\nline 2\n\nEOF", null);

Modified: jmeter/trunk/test/src/org/apache/jmeter/assertions/SizeAssertionTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/assertions/SizeAssertionTest.java?rev=1380341&r1=1380340&r2=1380341&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/assertions/SizeAssertionTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/assertions/SizeAssertionTest.java Mon Sep  3 20:13:43
2012
@@ -26,21 +26,19 @@ import org.apache.jmeter.threads.JMeterV
 
 public class SizeAssertionTest extends JMeterTestCase{
 
-      private JMeterContext jmctx;
       private SizeAssertion assertion;
       private SampleResult sample1,sample0;
-      private JMeterVariables vars;
       private AssertionResult result;
-      private String data1 = "response Data\n" +  "line 2\n\nEOF";
-      private int data1Len=data1.length();
+      private final String data1 = "response Data\n" +  "line 2\n\nEOF";
+      private final int data1Len=data1.length();
       
       @Override
     public void setUp() {
-          jmctx = JMeterContextService.getContext();
+          JMeterContext jmctx = JMeterContextService.getContext();
           assertion = new SizeAssertion();
           assertion.setThreadContext(jmctx);
           assertion.setTestFieldResponseBody();
-          vars = new JMeterVariables();
+          JMeterVariables vars = new JMeterVariables();
           jmctx.setVariables(vars);
           sample0 = new SampleResult();
           sample1 = new SampleResult();
@@ -151,9 +149,9 @@ public class SizeAssertionTest extends J
 // TODO - need a lot more tests
       
       private void assertPassed() throws Exception{
-          if (null != result.getFailureMessage()){
+         // if (null != result.getFailureMessage()){
               //System.out.println(result.getFailureMessage());// debug
-          }
+          //}
           assertNull("Failure message should be null",result.getFailureMessage());
           assertFalse(result.isError());
           assertFalse(result.isFailure());        



Mime
View raw message