You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2021/06/21 11:27:00 UTC
[sling-org-apache-sling-commons-crypto] branch master updated: add
assertion
This is an automated email from the ASF dual-hosted git repository.
olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-crypto.git
The following commit(s) were added to refs/heads/master by this push:
new c3297e1 add assertion
c3297e1 is described below
commit c3297e10b51b3fe09fea8495b2227e233fa35653
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Mon Jun 21 13:26:48 2021 +0200
add assertion
---
.../crypto/webconsole/internal/EncryptWebConsolePluginTest.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/sling/commons/crypto/webconsole/internal/EncryptWebConsolePluginTest.java b/src/test/java/org/apache/sling/commons/crypto/webconsole/internal/EncryptWebConsolePluginTest.java
index 12fd57b..de31c2d 100644
--- a/src/test/java/org/apache/sling/commons/crypto/webconsole/internal/EncryptWebConsolePluginTest.java
+++ b/src/test/java/org/apache/sling/commons/crypto/webconsole/internal/EncryptWebConsolePluginTest.java
@@ -30,6 +30,7 @@ import org.junit.Test;
import org.osgi.framework.BundleContext;
import static com.google.common.truth.Truth.assertThat;
+import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -53,7 +54,12 @@ public class EncryptWebConsolePluginTest {
@Test
public void testDeactivateWithNoServiceTracker() {
final EncryptWebConsolePlugin plugin = new EncryptWebConsolePlugin();
- plugin.deactivate();
+ try {
+ plugin.deactivate();
+ } catch (Exception e) {
+ final String message = String.format("Deactivating component should not throw exception: %s", e.getMessage());
+ fail(message);
+ }
}
}