{"id":25776375,"url":"https://github.com/jdlib/deepdive","last_synced_at":"2026-03-01T12:13:15.226Z","repository":{"id":86570616,"uuid":"389624650","full_name":"jdlib/deepdive","owner":"jdlib","description":"Fluent assertions library for Java","archived":false,"fork":false,"pushed_at":"2025-06-24T06:22:15.000Z","size":589,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-24T06:38:26.407Z","etag":null,"topics":["assertion-library","fluent-api","java","testing","testing-library","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdlib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-07-26T12:28:23.000Z","updated_at":"2025-06-24T06:22:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"c2eb9ee6-c96f-47ea-9fad-cb85d9b8e5df","html_url":"https://github.com/jdlib/deepdive","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jdlib/deepdive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdlib%2Fdeepdive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdlib%2Fdeepdive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdlib%2Fdeepdive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdlib%2Fdeepdive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdlib","download_url":"https://codeload.github.com/jdlib/deepdive/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdlib%2Fdeepdive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29966684,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T09:33:09.965Z","status":"ssl_error","status_checked_at":"2026-03-01T09:25:48.915Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["assertion-library","fluent-api","java","testing","testing-library","unit-testing"],"created_at":"2025-02-27T06:01:22.524Z","updated_at":"2026-03-01T12:13:15.218Z","avatar_url":"https://github.com/jdlib.png","language":"Java","readme":"# DeepDive Assertions\n\nDeepDive is an assertion library for Java.\nIt offers a fluent API which allows you to *dive deep*, \ni.e. going back and forth between different assertion objects.\n\n## TL;DR\nTests written with DeepDive look like this:\n\n```java\t\t\nimport java.io.File;\nimport static java.nio.StandardCharsets.UTF_8;\nimport static deepdive.ExpectThat.expectThat;\t\t\n\t\n// inside a test method:\t\t\nFile dir = ...                     // dir is a File object which we expect to be a directory  \nexpectThat(dir)                    // starting with a deepdive.actual.io.FileActual to test the directory\n    .isDirectory()                 // test a File property\n    .name()                        // dive into a deepdive.actual.lang.StringActual to test the File name\n    \t.startsWith(\"test_\")       // test a File name property\n    \t.endsWith(\"_files\")        // test a File name property\n    \t.back()                    // back to the FileActual\n    .set().childFile(\"result.txt\") // replace the actual File value with a child File\n    .exists()                      // test a File property\n    .isFile()                      // test a File property\n    .not().isHidden()              // negate any available assertion by a preceding not() \n    .length()                      // dive into a deepdive.actual.lang.LongActual to the test the file length\n        .greater(50)               // test a File length property\n        .back()                    // back to the FileActual\n    .read(UTF_8).lineIterator()    // read file content as lines and dive into a deepdive.actual.util.StringIteratorActual \n        .next()                    // dive into a StringActual for the first line \n            .startsWith(\"Hold your breath\") // tests a line property\n            .back()                // back to the StringIteratorActual\n        .skip(5)                   // skip 5 lines\n        .next()                    // dive into a StringActual to test the next line\n            .isLowerCase()         // test a line property\n            .back()                // back to the StringIteratorActual\n    \t.not().hasNext();          // test for iteration end: done!\n```\n\t\t\n## License\nDeepDive can be used under the terms of the Gnu Public License v3 or \nthe Apache 2.0 license, see [License.md](License.md) for details.\n\n## Dependencies\nDeepDive requires Java 11+ and has no external dependencies.\nIt works great with test engines like [JUnit](https://junit.org/junit5/) or [TestNG](https://testng.org/doc/), \njust transition over from JUnit or TestNG assertions to the ones offered by DeepDive.  \n\n## Add to your build\n\nTo add a Maven dependency on DeepDive, use the following dependency declaration:\n\n\t\u003cdependency\u003e\n\t\t\u003cgroupId\u003eio.github.jdlib\u003c/groupId\u003e\n\t\t\u003cartifactId\u003edeepdive\u003c/artifactId\u003e\n\t\t\u003cversion\u003e1.3.0\u003c/version\u003e\n\t\t\u003cscope\u003etest\u003c/scope\u003e\n\t\u003c/dependency\u003e\n\nor directly download the [latest release](https://github.com/jdlib/deepdive/releases/latest).\n\n## How to use\nThe [user guide](UserGuide.md) explains how to use DeepDive.\n\t\n\n## Why to use\nLike other Java assertions libraries (e.g. [FEST Assert](https://github.com/alexruiz/fest-assert-2.x), \n[AssertJ](https://assertj.github.io/doc/) and [Google Truth](https://truth.dev)) DeepDive \nprovides a fluent API to state assertions.\nBut it goes beyond those libraries \n- by allowing to *dive deep*, i.e. going back and forth between different assertion objects, \n- providing *not*-mode to easily negate any assertion provided by the API,\n- therefore resulting in a small library (~250K) with great assertion power.\n\nFor further details please dive into [Motivation.md](Motivation.md).  \n \n## Limitations\nDeepDive makes heavy use of type parameters and recursive type bounds.\nThe Eclipse Compiler for Java (ECJ) used by Eclipse IDE seems to be \n[challenged](https://bugs.eclipse.org/bugs/show_bug.cgi?id=574309) by this.\nTherefore you may experience compile errors when diving *too deep* into assertion objects.\njavac from the JDK is not affected.\n","funding_links":[],"categories":["测试"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdlib%2Fdeepdive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdlib%2Fdeepdive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdlib%2Fdeepdive/lists"}