You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2020/05/05 19:20:37 UTC
[jspwiki] 28/35: small test refactor
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 62857b905460a05ccfcfff5287b477b594512198
Author: juanpablo <ju...@apache.org>
AuthorDate: Sun May 3 20:03:40 2020 +0200
small test refactor
---
.../test/java/org/apache/wiki/workflow/WorkflowManagerTest.java | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/workflow/WorkflowManagerTest.java b/jspwiki-main/src/test/java/org/apache/wiki/workflow/WorkflowManagerTest.java
index 3db7311..5ec58c7 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/workflow/WorkflowManagerTest.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/workflow/WorkflowManagerTest.java
@@ -94,14 +94,7 @@ public class WorkflowManagerTest {
Assertions.assertEquals( new GroupPrincipal( "Admin" ), wm.getApprover( "workflow.bar" ) );
// 'saveWikiPage' workflow doesn't require approval, so we will need to catch an Exception
- try {
- Assertions.assertEquals( new GroupPrincipal( "Admin" ), wm.getApprover( "workflow.saveWikiPage" ) );
- } catch( final WikiException e ) {
- // Swallow
- return;
- }
- // We should never get here
- Assertions.fail( "Workflow.bar doesn't need approval!" );
+ Assertions.assertThrows( WikiException.class, () -> wm.getApprover( "workflow.saveWikiPage" ) );
}
}