You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:20:59 UTC

[sling-org-apache-sling-testing-rules] 03/08: SLING-6437 - TestDescriptionRule in testing rules has incorrect has wrong order of method calls

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.rules-1.0.1
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-rules.git

commit cf84690ef9d851373608094a8f2cba308266a972
Author: Chetan Mehrotra <ch...@apache.org>
AuthorDate: Thu Jan 5 08:28:11 2017 +0000

    SLING-6437 - TestDescriptionRule in testing rules has incorrect has wrong order of method calls
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/junit/rules@1777432 13f79535-47bb-0310-9956-ffa450edef68
---
 .../apache/sling/testing/junit/rules/TestDescriptionRule.java    | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/sling/testing/junit/rules/TestDescriptionRule.java b/src/main/java/org/apache/sling/testing/junit/rules/TestDescriptionRule.java
index 080e423..2f9f7d1 100644
--- a/src/main/java/org/apache/sling/testing/junit/rules/TestDescriptionRule.java
+++ b/src/main/java/org/apache/sling/testing/junit/rules/TestDescriptionRule.java
@@ -25,17 +25,16 @@ import org.junit.runner.Description;
  */
 public class TestDescriptionRule extends TestWatcher {
 
-
     @Override
     protected void finished(Description description) {
-        TestDescriptionHolder.setClassName(description.getClassName());
-        TestDescriptionHolder.setMethodName(description.getMethodName());
+        TestDescriptionHolder.removeMethodName();
+        TestDescriptionHolder.removeClassName();
     }
 
     @Override
     protected void starting (Description description) {
-        TestDescriptionHolder.removeMethodName();
-        TestDescriptionHolder.removeClassName();
+        TestDescriptionHolder.setClassName(description.getClassName());
+        TestDescriptionHolder.setMethodName(description.getMethodName());
     }
 
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.