diff --git a/pom.xml b/pom.xml
index 984eaa063c..1ba9e02a1f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@ The MIT License (MIT)
com.jcabi
parent
- 0.49.4
+ 0.50.0
org.cactoos
cactoos
@@ -81,6 +81,9 @@ The MIT License (MIT)
https://github.com/yegor256/cactoos
+
+ 5.6.2
+
org.takes
@@ -110,19 +113,34 @@ The MIT License (MIT)
+
+
+ org.junit.vintage
+ junit-vintage-engine
+ ${junit-platform.version}
+ test
+
+
+ junit
+ junit
+ 4.13
+ test
+
+
+ org.hamcrest
+ hamcrest-core
+ 1.3
+ test
+
-
- maven-compiler-plugin
- 3.8.0
-
-
- 1.8
- false
-
-
org.apache.maven.plugins
maven-verifier-plugin
@@ -141,14 +159,15 @@ The MIT License (MIT)
- com.googlecode.maven-download-plugin
- download-maven-plugin
- 1.4.2
-
-
- org.codehaus.mojo
- exec-maven-plugin
- 1.6.0
+ maven-site-plugin
+ 3.9.1
+
+
+ org.apache.maven.doxia
+ doxia-module-markdown
+ 1.9.1
+
+
@@ -158,13 +177,6 @@ The MIT License (MIT)
maven-verifier-plugin
-
-
- kr.motd.maven
- os-maven-plugin
- 1.6.1
-
-
@@ -217,7 +229,7 @@ The MIT License (MIT)
org.jacoco
jacoco-maven-plugin
- 0.8.0
+ 0.8.5
@@ -283,32 +295,6 @@ The MIT License (MIT)
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 3.0.0
-
-
-
- todo
- X
-
-
- checkstyle
- X
-
-
-
-
-
- javadoc-generate
- test
-
- javadoc
-
-
-
-
@@ -332,36 +318,5 @@ The MIT License (MIT)
-
- jcabi-gpg
-
-
- gpg.keyname
-
-
-
-
-
- maven-gpg-plugin
- 1.6
-
-
- jcabi-sign-artifacts
- verify
-
- sign
-
-
-
- --pinentry-mode
- loopback
-
-
-
-
-
-
-
-
diff --git a/src/test/java/org/cactoos/map/NoNullsTest.java b/src/test/java/org/cactoos/map/NoNullsTest.java
index 01e2eb32d8..313a518c57 100644
--- a/src/test/java/org/cactoos/map/NoNullsTest.java
+++ b/src/test/java/org/cactoos/map/NoNullsTest.java
@@ -30,9 +30,9 @@
import org.hamcrest.core.AllOf;
import org.hamcrest.core.IsEqual;
import org.junit.Ignore;
-import org.junit.Rule;
import org.junit.Test;
-import org.junit.rules.ExpectedException;
+import org.llorllale.cactoos.matchers.Assertion;
+import org.llorllale.cactoos.matchers.Throws;
/**
* Test case for {@link NoNulls}.
@@ -50,12 +50,6 @@
)
public final class NoNullsTest {
- /**
- * A rule for handling an exception.
- */
- @Rule
- public final ExpectedException exception = ExpectedException.none();
-
@Test
public void getSize() {
MatcherAssert.assertThat(
@@ -374,27 +368,33 @@ public void entrySet() {
@Test
public void putThrowsErrorIfValueNull() {
- this.exception.expect(IllegalStateException.class);
- this.exception.expectMessage(
- "Value at #put(1,V) is NULL"
- );
- new NoNulls(
- new HashMap<>()
- ).put(1, null);
+ new Assertion<>(
+ "Should throws an error if value is null",
+ () -> new NoNulls(
+ new HashMap<>()
+ ).put(1, null),
+ new Throws<>(
+ "Value at #put(1,V) is NULL",
+ IllegalStateException.class
+ )
+ ).affirm();
}
@Test
public void putThrowsErrorIfPreviousValueNull() {
- this.exception.expect(IllegalStateException.class);
- this.exception.expectMessage(
- "Value returned by #put(1,2) is NULL"
- );
- new NoNulls<>(
- new HashMap() {
- {
- put(1, null);
+ new Assertion<>(
+ "Should throws an error if previous value is null",
+ () -> new NoNulls<>(
+ new HashMap() {
+ {
+ put(1, null);
+ }
}
- }
- ).put(1, 2);
+ ).put(1, 2),
+ new Throws<>(
+ "Value returned by #put(1,2) is NULL",
+ IllegalStateException.class
+ )
+ ).affirm();
}
}