{"id":26022954,"url":"https://github.com/agrison/vavr-matchers","last_synced_at":"2026-06-08T05:31:11.140Z","repository":{"id":52873903,"uuid":"357688449","full_name":"agrison/vavr-matchers","owner":"agrison","description":"Hamcrest matchers for Vavr","archived":false,"fork":false,"pushed_at":"2022-01-06T19:58:18.000Z","size":57,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-18T16:52:08.740Z","etag":null,"topics":["hamcrest","hamcrest-extensions","hamcrest-matchers","java","vavr"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agrison.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-13T21:05:10.000Z","updated_at":"2022-01-06T19:55:59.000Z","dependencies_parsed_at":"2022-08-23T13:01:47.129Z","dependency_job_id":null,"html_url":"https://github.com/agrison/vavr-matchers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/agrison/vavr-matchers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrison%2Fvavr-matchers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrison%2Fvavr-matchers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrison%2Fvavr-matchers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrison%2Fvavr-matchers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agrison","download_url":"https://codeload.github.com/agrison/vavr-matchers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrison%2Fvavr-matchers/sbom","scorecard":{"id":171210,"data":{"date":"2025-08-11","repo":{"name":"github.com/agrison/vavr-matchers","commit":"db29dfba60b864d6809674a253f545abc930150f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/agrison/vavr-matchers/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/agrison/vavr-matchers/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/agrison/vavr-matchers/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/agrison/vavr-matchers/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/agrison/vavr-matchers/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/agrison/vavr-matchers/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/agrison/vavr-matchers/release.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T16:31:10.835Z","repository_id":52873903,"created_at":"2025-08-16T16:31:10.835Z","updated_at":"2025-08-16T16:31:10.835Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34050225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hamcrest","hamcrest-extensions","hamcrest-matchers","java","vavr"],"created_at":"2025-03-06T10:37:35.550Z","updated_at":"2026-06-08T05:31:11.122Z","avatar_url":"https://github.com/agrison.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vavr-matchers\n\n![vavr-matchers](https://github.com/agrison/vavr-matchers/workflows/build/badge.svg)\n[![codecov](https://codecov.io/gh/agrison/vavr-matchers/branch/master/graph/badge.svg?token=lkICxLZmij)](https://codecov.io/gh/agrison/vavr-matchers)\n\nThis library contains [Vavr](https://github.com/vavr-io/vavr) matchers for [hamcrest](https://github.com/hamcrest/JavaHamcrest).\n\n## Install\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eme.grison\u003c/groupId\u003e\n  \u003cartifactId\u003evavr-matchers\u003c/artifactId\u003e\n  \u003cversion\u003e1.3\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Usage\n\n```java\nimport static me.grison.vavr.matchers.VavrMatchers.*;\nimport static org.hamcrest.Matchers.*;\nimport static org.hamcrest.MatcherAssert.assertThat;\n\nclass AllTests {\n    @Test\n    public void testTry() {\n        Try\u003cInteger\u003e age = Try.of(() -\u003e 30);\n\n        // ensure the Try is a success and its value is less than 40\n        assertThat(age, isSuccess(lessThan(40)));\n    }\n    \n    @Test\n    public void testTraversable() {\n        List\u003cInteger\u003e ages = List.of(28, 35, 36, 40);\n\n        // ensure not empty\n        assertThat(ages, not(isEmpty()));\n\n        // ensure length is 4\n        assertThat(ages, hasLength(4));\n\n        // ensure it contains 35\n        assertThat(ages, contains(35));\n\n        // ensure it contains at least a value less than 30\n        assertThat(ages, contains(lessThan(30)));\n\n        // ensure that all values are less than 50\n        assertThat(ages, allMatch(lessThan(50)));\n    }\n}\n```\n\nSee below for all available matchers.\n\n## Matchers\n\n### Option\n\n| Assertion                 | Description                                       |\n|------------------------|---------------------------------------------------|\n| isDefined()     | Verifies that an `Option` is defined |\n| isDefined(Matcher)     | Verifies that an `Option` is defined and its content matches a `Matcher` |\n| isEmpty()     | Verifies that an `Option` is undefined |\n\n### Try\n\n| Assertion                 | Description                                       |\n|------------------------|---------------------------------------------------|\n| isSuccess()     | Verifies that a `Try` is a `Success` |\n| isSuccess(Matcher)     | Verifies that a `Try` is a `Success` and its content matches a `Matcher` |\n| isFailure()     | Verifies that a `Try` is a `Failure` |\n| isFailure(Class\u0026lt;E extends Throwable\u003e)     | Verifies that a `Try` is a `Failure` and its cause is a specific `Throwable` |\n\n### Either\n\n| Assertion                 | Description                                       |\n|------------------------|---------------------------------------------------|\n| isRight()     | Verifies that an `Either` is a `Right` |\n| isRight(Matcher)     | Verifies that an `Either` is a `Right` and its content matches a `Matcher` |\n| isLeft()     | Verifies that an `Either` is a `Left` |\n| isLeft(Matcher)     | Verifies that an `Either` is a `Left` and its content matches a `Matcher` |\n\n### Traversable\n\n| Assertion                 | Description                                       |\n|------------------------|---------------------------------------------------|\n| isEmpty()     | Verifies that a `Traversable` is empty |\n| hasLength(int)     | Verifies that a `Traversable` has a specific length |\n| hasLength(Matcher)     | Verifies that a `Traversable` has a length matching a `Matcher` |\n| contains(T)     | Verifies that a `Traversable` contain a specific element |\n| contains(Matcher)     | Verifies that a `Traversable` contain a specific element matching a `Matcher` |\n| containsSubList(T...)     | Verifies that a `Traversable` contain a specific sublist (with no other elements in between) |\n| containsSubList(Traversable)     | Verifies that a `Traversable` contain a specific sublist (with no other elements in between) |\n| containsInAnyOrder(T...)     | Verifies that a `Traversable` contain the given elements |\n| containsInAnyOrder(Traversable)     | Verifies that a `Traversable` contain the given elements |\n| containsInOrder(T...)     | Verifies that a `Traversable` contain the given elements in order (with possibly other elements in between) |\n| containsInOrder(Traversable)     | Verifies that a `Traversable` contain the given elements in order (with possibly other elements in between) |\n| allMatch(Matcher)     | Verifies that a `Traversable` contain only elements matching a `Matcher` |\n| isSorted()     | Verifies that a `Traversable` is sorted |\n| isReverseSorted()     | Verifies that a `Traversable` is reverse sorted |\n| startsWith(T...)     | Verifies that a `Traversable` starts with the given elements |\n| startsWith(Traversable)     | Verifies that a `Traversable` starts with the given elements |\n| endsWith(T...)     | Verifies that a `Traversable` ends with the given elements |\n| endsWith(Traversable)     | Verifies that a `Traversable` ends with the given elements |\n| isUnique()     | Verifies that a `Traversable` contains no duplicates |\n\n### Set\n\n| Assertion                 | Description                                       |\n|------------------------|---------------------------------------------------|\n| containsSubSet(T...)     | Verifies that a `Set` contains at least the given elements |\n| containsSubSet(Traversable)     | Verifies that a `Set` contains at least the given elements |\n| isSubSetOf(T...)     | Verifies that a `Set` is a subset of the given elements |\n| isSubSetOf(Traversable)     | Verifies that a `Set` is a subset of the given elements |\n\n### Map\n\n| Assertion                 | Description                                       |\n|------------------------|---------------------------------------------------|\n| containsKeys(T...)     | Verifies that a `Map` contains at least the given keys |\n| containsKeys(Traversable)     | Verifies that a `Map` contains at least the given keys |\n| containsValues(T...)     | Verifies that a `Map` contains at least the given values |\n| containsValues(Traversable)     | Verifies that a `Map` contains at least the given values |\n| contains(T key, U value)     | Verifies that a `Map` contains at least the given entry |\n\n### Future\n\n| Assertion                 | Description                                       |\n|------------------------|---------------------------------------------------|\n| isCancelled()     | Verifies that a `Future` is cancelled |\n| isCompleted()     | Verifies that a `Future` is completed |\n| isCompleted(Matcher)     | Verifies that a `Future` is completed and its content matches a `Matcher` |\n\n### Lazy\n\n| Assertion                 | Description                                       |\n|------------------------|---------------------------------------------------|\n| isEvaluated()     | Verifies that a `Lazy` has been evaluated |\n| isEvaluated(Matcher)     | Verifies that a `Lazy` has been evaluated and its content matches a `Matcher` |\n\n### Tuple\n\n| Assertion                 | Description                                       |\n|------------------------|---------------------------------------------------|\n| hasArity(int)     | Verifies that a `Tuple` has a specific arity |\n| hasArity(Matcher)     | Verifies that a `Tuple` has a specific arity matching a `Matcher` |\n\n### Validation\n\n| Assertion                 | Description                                       |\n|------------------------|---------------------------------------------------|\n| isValid()     | Verifies that a `Validation` is valid |\n| isValid(Matcher)     | Verifies that a `Validation` is valid and its content matches a `Matcher` |\n| isInvalid()     | Verifies that a `Validation` is invalid |\n| isInvalid(Matcher)     | Verifies that a `Validation` is invalid and its content matches a `Matcher` |\n\n## Contribute\n\nIt is a work in progress, so don't hesitate to contribute and add more matchers.\n\n## Thanks\n\nI needed this library and discovered an existing one from Vincent Ambo (@tazjin): https://github.com/tazjin/vavr-matchers\n\nUnfortunately it has been archived for years and couldn't fork it, so as I needed new functionalities here comes this library.\n\n## Self-promotion\n\nThis library is also covered in my book [Practical Vavr](https://leanpub.com/practical-vavr).\n\n**Practical Vavr** is all about making you want to use **Vavr** in your day to day Java programming.\n\nIf you want to improve the quality of your code by using a well-thought and beautifully designed functional programming\nlibrary for Java, then you need to adopt Vavr, and this book will help you put it in practice.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrison%2Fvavr-matchers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagrison%2Fvavr-matchers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrison%2Fvavr-matchers/lists"}