{"id":16897401,"url":"https://github.com/robwin/assertj-diff","last_synced_at":"2025-04-11T13:43:44.812Z","repository":{"id":57734660,"uuid":"53836727","full_name":"RobWin/assertj-diff","owner":"RobWin","description":"AssertJ assertion for diffing files.","archived":false,"fork":false,"pushed_at":"2016-03-14T10:15:46.000Z","size":125,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T10:01:38.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobWin.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-14T07:47:37.000Z","updated_at":"2016-10-17T11:37:51.000Z","dependencies_parsed_at":"2022-09-26T22:10:52.871Z","dependency_job_id":null,"html_url":"https://github.com/RobWin/assertj-diff","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobWin%2Fassertj-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobWin%2Fassertj-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobWin%2Fassertj-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobWin%2Fassertj-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobWin","download_url":"https://codeload.github.com/RobWin/assertj-diff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248410877,"owners_count":21098789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-13T17:36:54.025Z","updated_at":"2025-04-11T13:43:44.779Z","avatar_url":"https://github.com/RobWin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= assertj-diff\n:author: Robert Winkler\n:version: 0.1.1\n:hardbreaks:\n\nimage:https://travis-ci.org/RobWin/assertj-diff.svg?branch=master[\"Build Status\", link=\"https://travis-ci.org/RobWin/assertj-diff\"] image:https://api.bintray.com/packages/robwin/maven/assertj-diff/images/download.svg[link=\"https://bintray.com/robwin/maven/assertj-diff/_latestVersion\"] image:http://img.shields.io/badge/license-ASF2-blue.svg[\"Apache License 2\", link=\"http://www.apache.org/licenses/LICENSE-2.0.txt\"] image:https://img.shields.io/badge/Twitter-rbrtwnklr-blue.svg[\"Twitter\", link=\"https://twitter.com/rbrtwnklr\"]\n\n== Overview\n\nThis library provides AssertJ assertions for diffing files. If a test fails, it generates an HTML report.\nIt uses https://github.com/sksamuel/google-diff-match-patch[google-diff-match-patch] to do the hard stuff.\n\nThe project requires at least JDK 7.\n\n=== Usage\n=== Adding assertj-diff to your project\nThe project is published in JCenter and Maven Central.\n\n==== Maven\n\n[source,xml, subs=\"specialcharacters,attributes\"]\n----\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003csnapshots\u003e\n            \u003cenabled\u003efalse\u003c/enabled\u003e\n        \u003c/snapshots\u003e\n        \u003cid\u003ecentral\u003c/id\u003e\n        \u003cname\u003ebintray\u003c/name\u003e\n        \u003curl\u003ehttp://jcenter.bintray.com\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.robwin\u003c/groupId\u003e\n    \u003cartifactId\u003eassertj-diff\u003c/artifactId\u003e\n    \u003cversion\u003e{version}\u003c/version\u003e\n\u003c/dependency\u003e\n----\n\n==== Gradle\n\n[source,groovy, subs=\"attributes\"]\n----\nrepositories {\n    jcenter()\n}\n\ncompile \"io.github.robwin:assertj-diff:{version}\"\n----\n\n=== Using assertj-diff\n\nYou can compare two files by providing the path to the actual file and to the expected file.\n\n[source,java]\n----\nPath actualFile = Paths.get(DiffAssertTest.class.getResource(\"/actualFile.txt\").toURI());\nPath expectedFile = Paths.get(DiffAssertTest.class.getResource(\"/expectedFile.txt\").toURI());\nPath reportPath = Paths.get(\"build/diff-result.txt\");\n\nDiffAssertions.assertThat(actualFilePath).isEqualTo(expectedFilePath, reportPath)\n----\n\nIf the test fails, assertj-diff generates a HTML into the given reportPath.\n\n==== Report Example\n\nimage::docs/images/diff-result.png[]\n\n== License\n\nCopyright 2016 Robert Winkler\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobwin%2Fassertj-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobwin%2Fassertj-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobwin%2Fassertj-diff/lists"}