jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject [jmeter] branch master updated: Align assert methods with rest of the code
Date Fri, 27 Sep 2019 16:37:10 GMT
This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new aa45e8f  Align assert methods with rest of the code
aa45e8f is described below

commit aa45e8fb24c886c00f8ea5dbc9370881a212056c
Author: Felix Schumacher <felix.schumacher@internetallee.de>
AuthorDate: Fri Sep 27 18:36:43 2019 +0200

    Align assert methods with rest of the code
---
 .../java/org/apache/jmeter/extractor/TestXPathExtractor.java     | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/components/src/test/java/org/apache/jmeter/extractor/TestXPathExtractor.java
b/src/components/src/test/java/org/apache/jmeter/extractor/TestXPathExtractor.java
index 6a32690..1541369 100644
--- a/src/components/src/test/java/org/apache/jmeter/extractor/TestXPathExtractor.java
+++ b/src/components/src/test/java/org/apache/jmeter/extractor/TestXPathExtractor.java
@@ -304,11 +304,12 @@ public class TestXPathExtractor {
             extractor.process();
             assertEquals(1, result.getAssertionResults().length);
             assertEquals(extractor.getName(), result.getAssertionResults()[0].getName());
-            org.junit.Assert.assertTrue(result.getAssertionResults()[0].
-                    getFailureMessage().contains("Content is not allowed in prolog"));
+            assertThat(result.getAssertionResults()[0].getFailureMessage(),
+                    containsString("Content is not allowed in prolog"));
             assertEquals("Default", vars.get(VAL_NAME));
             assertEquals("0", vars.get(VAL_NAME_NR));
         }
+
         @Test
         public void testInvalidDocument() throws Exception {
             result.setResponseData("<z>", null);
@@ -317,8 +318,8 @@ public class TestXPathExtractor {
 
             assertEquals(1, result.getAssertionResults().length);
             assertEquals(extractor.getName(), result.getAssertionResults()[0].getName());
-            org.junit.Assert.assertThat(result.getAssertionResults()[0].
-                    getFailureMessage(), containsString("XML document structures must start
and end within the same entity"));
+            assertThat(result.getAssertionResults()[0].getFailureMessage(),
+                    containsString("XML document structures must start and end within the
same entity"));
 
             assertEquals("Default", vars.get(VAL_NAME));
             assertEquals("0", vars.get(VAL_NAME_NR));


Mime
View raw message