Skip to content

Commit

Permalink
feat(deps): Update dependencies 2023.12.12 (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseLion authored Jan 1, 2024
1 parent beea222 commit 49a6390
Show file tree
Hide file tree
Showing 15 changed files with 695 additions and 754 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21.1.0
21.5.0
670 changes: 335 additions & 335 deletions .yarn/releases/yarn-4.0.1.cjs → .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ plugins:
path: .yarn/plugins/@yarnpkg/plugin-engines.cjs
spec: "https://raw.githubusercontent.com/devoto13/yarn-plugin-engines/main/bundles/%40yarnpkg/plugin-engines.js"

yarnPath: .yarn/releases/yarn-4.0.1.cjs
yarnPath: .yarn/releases/yarn-4.0.2.cjs
7 changes: 7 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ dependencyLocking {
lockAllConfigurations()
}

// Workaround for: https://github.com/checkstyle/checkstyle/issues/14211
configurations.checkstyle {
resolutionStrategy.capabilitiesResolution.withCapability("com.google.collections:google-collections") {
select("com.google.guava:guava:0")
}
}

repositories {
mavenCentral()
}
Expand Down
4 changes: 2 additions & 2 deletions buildscript-gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ io.github.joselion:pretty-jupiter:3.1.0=classpath
io.github.joselion:strict-null-check:3.2.0=classpath
me.champeau.gradle.mrjar:plugin:0.1.1=classpath
me.champeau.mrjar:me.champeau.mrjar.gradle.plugin:0.1.1=classpath
name.remal.gradle-plugins.sonarlint:sonarlint:3.3.14=classpath
name.remal.sonarlint:name.remal.sonarlint.gradle.plugin:3.3.14=classpath
name.remal.gradle-plugins.sonarlint:sonarlint:3.4.1=classpath
name.remal.sonarlint:name.remal.sonarlint.gradle.plugin:3.4.1=classpath
empty=
88 changes: 45 additions & 43 deletions gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,19 @@ com.fasterxml.staxmate:staxmate:2.4.0=sonarlintCoreClasspath
com.fasterxml.woodstox:woodstox-core:6.4.0=sonarlintCoreClasspath
com.google.code.findbugs:jsr305:3.0.2=checkstyle,sonarlintCoreClasspath
com.google.code.gson:gson:2.8.9=sonarlintCoreClasspath
com.google.collections:google-collections:1.0=checkstyle
com.google.errorprone:error_prone_annotations:2.18.0=checkstyle
com.google.guava:failureaccess:1.0.1=checkstyle
com.google.guava:guava:32.0.1-jre=checkstyle
com.google.errorprone:error_prone_annotations:2.23.0=checkstyle
com.google.guava:failureaccess:1.0.2=checkstyle
com.google.guava:guava:33.0.0-jre=checkstyle
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=checkstyle
com.google.j2objc:j2objc-annotations:2.8=checkstyle
com.puppycrawl.tools:checkstyle:10.12.4=checkstyle
com.puppycrawl.tools:checkstyle:10.12.7=checkstyle
commons-beanutils:commons-beanutils:1.9.4=checkstyle
commons-codec:commons-codec:1.15=checkstyle
commons-collections:commons-collections:3.2.2=checkstyle
commons-io:commons-io:2.11.0=sonarlintCoreClasspath
info.picocli:picocli:4.7.5=checkstyle
net.bytebuddy:byte-buddy-agent:1.14.9=java17TestCompileClasspath,java17TestRuntimeClasspath,java20TestCompileClasspath,java20TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
net.bytebuddy:byte-buddy:1.14.9=java17TestCompileClasspath,java17TestRuntimeClasspath,java20TestCompileClasspath,java20TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
net.sf.saxon:Saxon-HE:12.3=checkstyle
net.bytebuddy:byte-buddy-agent:1.14.10=java17TestCompileClasspath,java17TestRuntimeClasspath,java21TestCompileClasspath,java21TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
net.bytebuddy:byte-buddy:1.14.11=java17TestCompileClasspath,java17TestRuntimeClasspath,java21TestCompileClasspath,java21TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
net.sf.saxon:Saxon-HE:12.4=checkstyle
org.antlr:antlr4-runtime:4.13.1=checkstyle
org.apache.commons:commons-compress:1.21=sonarlintCoreClasspath
org.apache.commons:commons-lang3:3.12.0=sonarlintCoreClasspath
Expand All @@ -34,36 +32,36 @@ org.apache.maven.doxia:doxia-core:1.12.0=checkstyle
org.apache.maven.doxia:doxia-logging-api:1.12.0=checkstyle
org.apache.maven.doxia:doxia-module-xdoc:1.12.0=checkstyle
org.apache.maven.doxia:doxia-sink-api:1.12.0=checkstyle
org.apache.tomcat.embed:tomcat-embed-core:9.0.81=sonarlintCoreClasspath
org.apache.tomcat.embed:tomcat-embed-el:9.0.81=sonarlintCoreClasspath
org.apache.tomcat.embed:tomcat-embed-jasper:9.0.81=sonarlintCoreClasspath
org.apache.tomcat:tomcat-annotations-api:9.0.81=sonarlintCoreClasspath
org.apache.tomcat.embed:tomcat-embed-core:9.0.84=sonarlintCoreClasspath
org.apache.tomcat.embed:tomcat-embed-el:9.0.84=sonarlintCoreClasspath
org.apache.tomcat.embed:tomcat-embed-jasper:9.0.84=sonarlintCoreClasspath
org.apache.tomcat:tomcat-annotations-api:9.0.84=sonarlintCoreClasspath
org.apache.xbean:xbean-reflect:3.7=checkstyle
org.apiguardian:apiguardian-api:1.1.2=java17TestCompileClasspath,java20TestCompileClasspath,testCompileClasspath
org.assertj:assertj-core:3.24.2=java17TestCompileClasspath,java17TestRuntimeClasspath,java20TestCompileClasspath,java20TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.checkerframework:checker-qual:3.27.0=checkstyle
org.apiguardian:apiguardian-api:1.1.2=java17TestCompileClasspath,java21TestCompileClasspath,testCompileClasspath
org.assertj:assertj-core:3.25.0=java17TestCompileClasspath,java17TestRuntimeClasspath,java21TestCompileClasspath,java21TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.checkerframework:checker-qual:3.42.0=checkstyle
org.codehaus.plexus:plexus-classworlds:2.6.0=checkstyle
org.codehaus.plexus:plexus-component-annotations:2.1.0=checkstyle
org.codehaus.plexus:plexus-container-default:2.1.0=checkstyle
org.codehaus.plexus:plexus-utils:3.3.0=checkstyle
org.codehaus.woodstox:stax2-api:4.2.1=sonarlintCoreClasspath
org.eclipse.jdt:org.eclipse.jdt.annotation:2.2.700=compileClasspath,java17CompileClasspath,java17TestCompileClasspath,java20CompileClasspath,java20TestCompileClasspath,testCompileClasspath
org.eclipse.jdt:org.eclipse.jdt.annotation:2.2.700=compileClasspath,java17CompileClasspath,java17TestCompileClasspath,java21CompileClasspath,java21TestCompileClasspath,testCompileClasspath
org.jacoco:org.jacoco.agent:0.8.11=jacocoAgent,jacocoAnt
org.jacoco:org.jacoco.ant:0.8.11=jacocoAnt
org.jacoco:org.jacoco.core:0.8.11=jacocoAnt
org.jacoco:org.jacoco.report:0.8.11=jacocoAnt
org.javassist:javassist:3.28.0-GA=checkstyle
org.junit.jupiter:junit-jupiter-api:5.10.0=java17TestCompileClasspath,java17TestRuntimeClasspath,java20TestCompileClasspath,java20TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:5.10.0=java17TestRuntimeClasspath,java20TestRuntimeClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-params:5.10.0=java17TestCompileClasspath,java17TestRuntimeClasspath,java20TestCompileClasspath,java20TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter:5.10.0=java17TestCompileClasspath,java17TestRuntimeClasspath,java20TestCompileClasspath,java20TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:1.10.0=java17TestCompileClasspath,java17TestRuntimeClasspath,java20TestCompileClasspath,java20TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:1.10.0=java17TestRuntimeClasspath,java20TestRuntimeClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-launcher:1.10.0=testRuntimeClasspath
org.junit:junit-bom:5.10.0=java17TestCompileClasspath,java17TestRuntimeClasspath,java20TestCompileClasspath,java20TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.mockito:mockito-core:5.7.0=java17TestCompileClasspath,java17TestRuntimeClasspath,java20TestCompileClasspath,java20TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.objenesis:objenesis:3.3=java17TestRuntimeClasspath,java20TestRuntimeClasspath,testRuntimeClasspath
org.opentest4j:opentest4j:1.3.0=java17TestCompileClasspath,java17TestRuntimeClasspath,java20TestCompileClasspath,java20TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-api:5.10.1=java17TestCompileClasspath,java17TestRuntimeClasspath,java21TestCompileClasspath,java21TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:5.10.1=java17TestRuntimeClasspath,java21TestRuntimeClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-params:5.10.1=java17TestCompileClasspath,java17TestRuntimeClasspath,java21TestCompileClasspath,java21TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter:5.10.1=java17TestCompileClasspath,java17TestRuntimeClasspath,java21TestCompileClasspath,java21TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:1.10.1=java17TestCompileClasspath,java17TestRuntimeClasspath,java21TestCompileClasspath,java21TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:1.10.1=java17TestRuntimeClasspath,java21TestRuntimeClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-launcher:1.10.1=testRuntimeClasspath
org.junit:junit-bom:5.10.1=java17TestCompileClasspath,java17TestRuntimeClasspath,java21TestCompileClasspath,java21TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.mockito:mockito-core:5.8.0=java17TestCompileClasspath,java17TestRuntimeClasspath,java21TestCompileClasspath,java21TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.objenesis:objenesis:3.3=java17TestRuntimeClasspath,java21TestRuntimeClasspath,testRuntimeClasspath
org.opentest4j:opentest4j:1.3.0=java17TestCompileClasspath,java17TestRuntimeClasspath,java21TestCompileClasspath,java21TestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.ow2.asm:asm-commons:9.6=jacocoAnt
org.ow2.asm:asm-tree:9.6=jacocoAnt
org.ow2.asm:asm:9.0=sonarlintCoreClasspath
Expand All @@ -74,25 +72,29 @@ org.sonarsource.analyzer-commons:sonar-analyzer-recognizers:2.7.0.1482=sonarlint
org.sonarsource.analyzer-commons:sonar-performance-measure:2.7.0.1482=sonarlintCoreClasspath
org.sonarsource.analyzer-commons:sonar-regex-parsing:2.7.0.1482=sonarlintCoreClasspath
org.sonarsource.analyzer-commons:sonar-xml-parsing:2.7.0.1482=sonarlintCoreClasspath
org.sonarsource.java:external-reports:7.27.1.33504=sonarlintCoreClasspath
org.sonarsource.java:java-checks:7.27.1.33504=sonarlintCoreClasspath
org.sonarsource.java:java-frontend:7.27.1.33504=sonarlintCoreClasspath
org.sonarsource.java:java-jsp:7.27.1.33504=sonarlintCoreClasspath
org.sonarsource.java:java-surefire:7.27.1.33504=sonarlintCoreClasspath
org.sonarsource.java:java-symbolic-execution:7.27.1.33504=sonarlintCoreClasspath
org.sonarsource.java:jdt:7.27.1.33504=sonarlintCoreClasspath
org.sonarsource.java:sonar-java-plugin:7.27.1.33504=sonarlintCoreClasspath
org.sonarsource.javascript:css:10.8.0.24207=sonarlintCoreClasspath
org.sonarsource.javascript:javascript-checks:10.8.0.24207=sonarlintCoreClasspath
org.sonarsource.javascript:sonar-javascript-plugin:10.8.0.24207=sonarlintCoreClasspath
org.sonarsource.kotlin:sonar-kotlin-plugin:2.18.0.2938=sonarlintCoreClasspath
org.sonarsource.java:external-reports:7.30.0.34429=sonarlintCoreClasspath
org.sonarsource.java:java-checks-aws:7.30.0.34429=sonarlintCoreClasspath
org.sonarsource.java:java-checks-common:7.30.0.34429=sonarlintCoreClasspath
org.sonarsource.java:java-checks:7.30.0.34429=sonarlintCoreClasspath
org.sonarsource.java:java-frontend:7.30.0.34429=sonarlintCoreClasspath
org.sonarsource.java:java-jsp:7.30.0.34429=sonarlintCoreClasspath
org.sonarsource.java:java-surefire:7.30.0.34429=sonarlintCoreClasspath
org.sonarsource.java:java-symbolic-execution:7.30.0.34429=sonarlintCoreClasspath
org.sonarsource.java:jdt:7.30.0.34429=sonarlintCoreClasspath
org.sonarsource.java:sonar-java-plugin:7.30.0.34429=sonarlintCoreClasspath
org.sonarsource.javascript:css:10.10.0.24774=sonarlintCoreClasspath
org.sonarsource.javascript:javascript-checks:10.10.0.24774=sonarlintCoreClasspath
org.sonarsource.javascript:sonar-javascript-plugin:10.10.0.24774=sonarlintCoreClasspath
org.sonarsource.kotlin:sonar-kotlin-plugin:2.20.0.4382=sonarlintCoreClasspath
org.sonarsource.slang:sonar-ruby-plugin:1.15.0.4655=sonarlintCoreClasspath
org.sonarsource.slang:sonar-scala-plugin:1.15.0.4655=sonarlintCoreClasspath
org.sonarsource.sonarlint.core:sonarlint-core:9.4.0.76070=sonarlintCore,sonarlintCoreClasspath
org.sonarsource.sonarlint.core:sonarlint-core:9.6.0.76599=sonarlintCore,sonarlintCoreClasspath
org.sonarsource.sslr:sslr-core:1.24.0.633=sonarlintCoreClasspath
org.sonarsource.xml:sonar-xml-plugin:2.10.0.4108=sonarlintCoreClasspath
org.springframework:spring-core:5.3.31=sonarlintCoreClasspath
org.springframework:spring-expression:5.3.31=sonarlintCoreClasspath
org.tukaani:xz:1.9=sonarlintCoreClasspath
org.xmlresolver:xmlresolver:5.2.0=checkstyle
org.xmlresolver:xmlresolver:5.2.2=checkstyle
xerces:xercesImpl:2.12.2=sonarlintCoreClasspath
xml-apis:xml-apis:1.4.01=sonarlintCoreClasspath
empty=annotationProcessor,java17AnnotationProcessor,java17RuntimeClasspath,java17TestAnnotationProcessor,java20AnnotationProcessor,java20RuntimeClasspath,java20TestAnnotationProcessor,runtimeClasspath,testAnnotationProcessor
empty=annotationProcessor,java17AnnotationProcessor,java17RuntimeClasspath,java17TestAnnotationProcessor,java21AnnotationProcessor,java21RuntimeClasspath,java21TestAnnotationProcessor,runtimeClasspath,testAnnotationProcessor
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
"repository": "git@github.com:JoseLion/maybe.git",
"author": "JoseLion <joseluis5000l@gmail.com>",
"license": "MIT",
"packageManager": "yarn@4.0.1",
"packageManager": "yarn@4.0.2",
"engines": {
"node": "21.5.0"
},
"scripts": {
"release": "semantic-release"
},
"devDependencies": {
"gradle-semantic-release-plugin": "^1.7.7",
"semantic-release": "^22.0.7"
"gradle-semantic-release-plugin": "^1.8.0",
"semantic-release": "^22.0.12"
}
}
14 changes: 7 additions & 7 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ rootProject.name = 'maybe'
dependencyResolutionManagement {
versionCatalogs {
libs {
version('checkstyle', '10.12.4')
version('checkstyle', '10.12.7')
version('jacoco', '0.8.11')
version('junit', '5.10.0')
version('sonarlint-core', '9.4.0.76070')
version('junit', '5.10.1')
version('sonarlint-core', '9.6.0.76599')

plugin('mrjar', 'me.champeau.mrjar').version('0.1.1')
plugin('prettyJupiter', 'io.github.joselion.pretty-jupiter').version('3.1.0')
plugin('publishPlugin', 'io.github.gradle-nexus.publish-plugin').version('2.0.0-rc-1')
plugin('sonarlint', 'name.remal.sonarlint').version('3.3.14')
plugin('sonarlint', 'name.remal.sonarlint').version('3.4.1')
plugin('strictNullCheck', 'io.github.joselion.strict-null-check').version('3.2.0')

library('assertj', 'org.assertj', 'assertj-core').version('3.24.2')
library('mockito', 'org.mockito', 'mockito-core').version('5.7.0')
library('sonarlint-java', 'org.sonarsource.java', 'sonar-java-plugin').version('7.27.1.33504')
library('assertj', 'org.assertj', 'assertj-core').version('3.25.0')
library('mockito', 'org.mockito', 'mockito-core').version('5.8.0')
library('sonarlint-java', 'org.sonarsource.java', 'sonar-java-plugin').version('7.30.0.34429')
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.joselion.maybe;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.assertj.core.api.Assertions.assertThatCode;
import static org.assertj.core.api.InstanceOfAssertFactories.THROWABLE;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.never;
Expand Down Expand Up @@ -95,7 +95,7 @@

assertThat(handler.success()).contains("OK");
assertThat(handler.error()).isEmpty();
assertThatThrownBy(fis::read)
assertThatCode(fis::read)
.isExactlyInstanceOf(IOException.class)
.hasMessage("Stream Closed");

Expand All @@ -112,7 +112,7 @@

assertThat(handler.success()).isEmpty();
assertThat(handler.error()).contains(FAIL_EXCEPTION);
assertThatThrownBy(fis::read)
assertThatCode(fis::read)
.isExactlyInstanceOf(IOException.class)
.hasMessage("Stream Closed");

Expand Down Expand Up @@ -160,7 +160,7 @@
.effect(effectSpy);

assertThat(handler.error()).isEmpty();
assertThatThrownBy(fis::read)
assertThatCode(fis::read)
.isExactlyInstanceOf(IOException.class)
.hasMessage("Stream Closed");

Expand All @@ -176,7 +176,7 @@
.effect(effectSpy);

assertThat(handler.error()).contains(FAIL_EXCEPTION);
assertThatThrownBy(fis::read)
assertThatCode(fis::read)
.isExactlyInstanceOf(IOException.class)
.hasMessage("Stream Closed");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatCode;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.assertj.core.api.InstanceOfAssertFactories.THROWABLE;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.never;
Expand Down Expand Up @@ -294,8 +293,8 @@
final var functionSpy = Spy.function((FileSystemException err) -> anotherError);
final var handler = Maybe.from(throwingOp);

assertThatThrownBy(handler::orThrow).isEqualTo(FAIL_EXCEPTION);
assertThatThrownBy(() -> handler.orThrow(functionSpy)).isEqualTo(anotherError);
assertThatCode(handler::orThrow).isEqualTo(FAIL_EXCEPTION);
assertThatCode(() -> handler.orThrow(functionSpy)).isEqualTo(anotherError);

verify(functionSpy, times(1)).apply(FAIL_EXCEPTION);
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/io/github/joselion/maybe/SolveHandlerTests.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.joselion.maybe;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.assertj.core.api.Assertions.assertThatCode;
import static org.assertj.core.api.InstanceOfAssertFactories.INPUT_STREAM;
import static org.assertj.core.api.InstanceOfAssertFactories.THROWABLE;
import static org.mockito.ArgumentMatchers.any;
Expand Down Expand Up @@ -522,8 +522,8 @@
final var functionSpy = Spy.function((FileSystemException error) -> anotherError);
final var handler = Maybe.from(throwingOp);

assertThatThrownBy(handler::orThrow).isEqualTo(FAILURE);
assertThatThrownBy(() -> handler.orThrow(functionSpy)).isEqualTo(anotherError);
assertThatCode(handler::orThrow).isEqualTo(FAILURE);
assertThatCode(() -> handler.orThrow(functionSpy)).isEqualTo(anotherError);

verify(functionSpy, times(1)).apply(FAILURE);
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/io/github/joselion/maybe/util/EitherTests.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.joselion.maybe.util;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.assertj.core.api.Assertions.assertThatCode;
import static org.assertj.core.api.InstanceOfAssertFactories.type;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.never;
Expand Down Expand Up @@ -29,7 +29,7 @@

@Nested class when_the_value_is_null {
@Test void throws_a_null_pointer_exception() {
assertThatThrownBy(() -> Either.ofLeft(null))
assertThatCode(() -> Either.ofLeft(null))
.isExactlyInstanceOf(NullPointerException.class)
.hasMessage("An Either cannot be created with a null value");
}
Expand All @@ -50,7 +50,7 @@

@Nested class when_the_value_is_null {
@Test void throws_a_null_pointer_exception() {
assertThatThrownBy(() -> Either.ofRight(null))
assertThatCode(() -> Either.ofRight(null))
.isExactlyInstanceOf(NullPointerException.class)
.hasMessage("An Either cannot be created with a null value");
}
Expand Down
Loading

0 comments on commit 49a6390

Please sign in to comment.