Registry / testing / hamcrest-optional

hamcrest-optional

JSON →
library2.0.0javamavenunverified

A set of Hamcrest matchers for java.util.Optional.

<dependency> <groupId>com.github.npathai</groupId> <artifactId>hamcrest-optional</artifactId> <version>2.0.0</version> </dependency>
INSTALL
IMPORT
SIG · HAMCREST-OPTIONAL
H
hamcrest-optional
testingjavav2.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

OptionalMatchers
com.github.npathai.hamcrestopt.OptionalMatchers

Uses Hamcrest matcher to assert an Optional is present.

import com.github.npathai.hamcrestopt.OptionalMatchers; import static org.hamcrest.MatcherAssert.assertThat; public class Example { public static void main(String[] args) { assertThat(java.util.Optional.of("test"), OptionalMatchers.isPresent()); System.out.println("Optional matcher works"); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.0.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
hamcrest-optional — mvn dependency:get hamcrest-optional · libregistry