You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/05/05 17:47:47 UTC
[commons-compress] branch master updated: Fix broken tests in SevenZMethodConfigurationTest.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git
The following commit(s) were added to refs/heads/master by this push:
new 8775f011 Fix broken tests in SevenZMethodConfigurationTest.
8775f011 is described below
commit 8775f01173191303b2ad968291fc95cdf4e6f87e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 5 13:47:42 2022 -0400
Fix broken tests in SevenZMethodConfigurationTest.
---
.../compress/archivers/sevenz/SevenZMethodConfigurationTest.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZMethodConfigurationTest.java b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZMethodConfigurationTest.java
index b5bf09e2..9550418e 100644
--- a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZMethodConfigurationTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZMethodConfigurationTest.java
@@ -17,6 +17,8 @@
*/
package org.apache.commons.compress.archivers.sevenz;
+import static org.junit.Assert.assertThrows;
+
import org.junit.Assert;
import org.junit.jupiter.api.Test;
import org.tukaani.xz.LZMA2Options;
@@ -69,12 +71,12 @@ public class SevenZMethodConfigurationTest {
@Test
public void shouldNotAllowStringOptionsForLZMA() {
- new SevenZMethodConfiguration(SevenZMethod.LZMA, "");
+ assertThrows(IllegalArgumentException.class, () -> new SevenZMethodConfiguration(SevenZMethod.LZMA, ""));
}
@Test
public void shouldNotAllowStringOptionsForLZMA2() {
- new SevenZMethodConfiguration(SevenZMethod.LZMA2, "");
+ assertThrows(IllegalArgumentException.class, () -> new SevenZMethodConfiguration(SevenZMethod.LZMA2, ""));
}
}