From 95d5837e312c08b02f806a5229896b63956d5d5c Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 21 Jun 2018 18:48:04 +0100 Subject: [PATCH] More upgrade and update tests to match new assertj error messages --- pom.xml | 12 +++--------- src/test/java/net/kemitix/mon/MaybeTest.java | 2 +- src/test/java/net/kemitix/mon/MonTest.java | 6 +++--- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 6d92ff7..9c1e68d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,12 +4,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - - net.kemitix - kemitix-parent - 5.1.0 - - net.kemitix mon 0.7.0-SNAPSHOT @@ -21,10 +15,10 @@ 1.18.0 2.11 0.8.1 - 2.20.1 - 2.20.1 + 2.22.0 + 2.22.0 net.kemitix.mon - 4.0.1 + 4.1.1 diff --git a/src/test/java/net/kemitix/mon/MaybeTest.java b/src/test/java/net/kemitix/mon/MaybeTest.java index ba68b3c..f8e7e33 100644 --- a/src/test/java/net/kemitix/mon/MaybeTest.java +++ b/src/test/java/net/kemitix/mon/MaybeTest.java @@ -24,7 +24,7 @@ public class MaybeTest { @Test public void justMustBeNonNull() { assertThatNullPointerException().isThrownBy(() -> just(null)) - .withMessage("value"); + .withMessageContaining("value"); } @Test diff --git a/src/test/java/net/kemitix/mon/MonTest.java b/src/test/java/net/kemitix/mon/MonTest.java index abe6a55..e54f9f9 100644 --- a/src/test/java/net/kemitix/mon/MonTest.java +++ b/src/test/java/net/kemitix/mon/MonTest.java @@ -97,7 +97,7 @@ public class MonTest { public void factoryRequiresValidator() { assertThatNullPointerException().isThrownBy( () -> Mon.factory(null, Optional::of, Optional::empty)) - .withMessage("validator"); + .withMessageContaining("validator"); } @Test @@ -105,7 +105,7 @@ public class MonTest { public void factoryRequiresOnValid() { assertThatNullPointerException().isThrownBy( () -> Mon.factory(v -> true, null, Optional::empty)) - .withMessage("onValid"); + .withMessageContaining("onValid"); } @Test @@ -113,7 +113,7 @@ public class MonTest { public void factoryRequiresOnInvalid() { assertThatNullPointerException().isThrownBy( () -> Mon.factory(v -> true, Optional::of, null)) - .withMessage("onInvalid"); + .withMessageContaining("onInvalid"); } @Test