jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1854236 - /jmeter/trunk/test/src/org/apache/jmeter/assertions/gui/AssertionGuiSpec.groovy
Date Sat, 23 Feb 2019 23:39:50 GMT
Author: pmouawad
Date: Sat Feb 23 23:39:50 2019
New Revision: 1854236

URL: http://svn.apache.org/viewvc?rev=1854236&view=rev
Log:
Add tests for AssertionGui

This closes #447 (Thanks Graham)

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/assertions/gui/AssertionGuiSpec.groovy

Modified: jmeter/trunk/test/src/org/apache/jmeter/assertions/gui/AssertionGuiSpec.groovy
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/assertions/gui/AssertionGuiSpec.groovy?rev=1854236&r1=1854235&r2=1854236&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/assertions/gui/AssertionGuiSpec.groovy (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/assertions/gui/AssertionGuiSpec.groovy Sat Feb
23 23:39:50 2019
@@ -17,60 +17,56 @@
 
 package org.apache.jmeter.assertions.gui
 
-import org.apache.jmeter.assertions.gui.AssertionGui
+import org.apache.jmeter.assertions.ResponseAssertion
 import org.apache.jmeter.junit.spock.JMeterSpec
-import spock.lang.Unroll
 
-import java.nio.charset.StandardCharsets
-
-@Unroll
 class AssertionGuiSpec extends JMeterSpec {
 
     def sut = new AssertionGui()
 
-    def "init of component fails"() {
+    def "init of component doesn't fail"() {
         when:
             sut.init()
         then:
-            notThrown(Exception)
+            noExceptionThrown()
     }
-    
-    def "GUI component fields clearing fails"() {
+
+    def "clearing GUI component fields doesn't fail"() {
         when:
             sut.clearGui()
         then:
-            notThrown(Exception)
+            noExceptionThrown()
     }
-    
-    def "Creation of ResponseAssertion fails"() {
+
+    def "Creation of ResponseAssertion doesn't fail"() {
         when:
             def result = sut.createTestElement()
         then:
-            result.getName().equals("Response Assertion")
+            result.getName() == "Response Assertion"
             result.isEnabled()
     }
-    
-    def "Modification of ResponseAssertion by GUI has unexpected behaviour"() {
+
+    def "Modification of ResponseAssertion by GUI has no unexpected behaviour"() {
         given:
-            def element = new ResponseAssertion();
+            def element = new ResponseAssertion()
             sut.clearGui()
         when:
             sut.modifyTestElement(element)
         then:
-            element.getName().equals("Response Assertion")
+            element.getName() == "Response Assertion"
             element.isTestFieldResponseData()
             element.getTestStrings().isEmpty()
             !element.getAssumeSuccess()
             !element.isNotType()
             element.isSubstringType()
     }
-    
-    def "Modification of GUI by ResponseAssertion has unexpected behaviour"() {
+
+    def "Modification of GUI by ResponseAssertion has no unexpected behaviour"() {
         given:
-            def element = new ResponseAssertion();
+            def element = new ResponseAssertion()
         when:
             sut.configure(element)
         then:
-            notThrown(Exception)
+            noExceptionThrown()
     }
 }



Mime
View raw message