assertj-diff

AssertJ assertions for diffing strings and files.

Лицензия

Лицензия

Группа

Группа

io.github.robwin
Идентификатор

Идентификатор

assertj-diff
Последняя версия

Последняя версия

0.1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

assertj-diff
AssertJ assertions for diffing strings and files.
Ссылка на сайт

Ссылка на сайт

https://github.com/RobWin/assertj-diff
Система контроля версий

Система контроля версий

https://github.com/RobWin/assertj-diff.git

Скачать assertj-diff

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.github.robwin/assertj-diff/ -->
<dependency>
    <groupId>io.github.robwin</groupId>
    <artifactId>assertj-diff</artifactId>
    <version>0.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.robwin/assertj-diff/
implementation 'io.github.robwin:assertj-diff:0.1.1'
// https://jarcasting.com/artifacts/io.github.robwin/assertj-diff/
implementation ("io.github.robwin:assertj-diff:0.1.1")
'io.github.robwin:assertj-diff:jar:0.1.1'
<dependency org="io.github.robwin" name="assertj-diff" rev="0.1.1">
  <artifact name="assertj-diff" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.robwin', module='assertj-diff', version='0.1.1')
)
libraryDependencies += "io.github.robwin" % "assertj-diff" % "0.1.1"
[io.github.robwin/assertj-diff "0.1.1"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.18
org.assertj : assertj-core jar 2.2.0
com.sksamuel.diff : diff jar 1.1.11
commons-io : commons-io jar 2.4

Модули Проекта

Данный проект не имеет модулей.

assertj-diff

Build Status download Apache License 2 Twitter

Overview

This library provides AssertJ assertions for diffing files. If a test fails, it generates an HTML report.
It uses google-diff-match-patch to do the hard stuff.

The project requires at least JDK 7.

Usage

Adding assertj-diff to your project

The project is published in JCenter and Maven Central.

Maven

<repositories>
    <repository>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <id>central</id>
        <name>bintray</name>
        <url>http://jcenter.bintray.com</url>
    </repository>
</repositories>

<dependency>
    <groupId>io.github.robwin</groupId>
    <artifactId>assertj-diff</artifactId>
    <version>0.1.1</version>
</dependency>

Gradle

repositories {
    jcenter()
}

compile "io.github.robwin:assertj-diff:0.1.1"

Using assertj-diff

You can compare two files by providing the path to the actual file and to the expected file.

Path actualFile = Paths.get(DiffAssertTest.class.getResource("/actualFile.txt").toURI());
Path expectedFile = Paths.get(DiffAssertTest.class.getResource("/expectedFile.txt").toURI());
Path reportPath = Paths.get("build/diff-result.txt");

DiffAssertions.assertThat(actualFilePath).isEqualTo(expectedFilePath, reportPath)

If the test fails, assertj-diff generates a HTML into the given reportPath.

Report Example

diff result

License

Copyright 2016 Robert Winkler

Licensed 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

http://www.apache.org/licenses/LICENSE-2.0

Unless 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.

Версии библиотеки

Версия
0.1.1
0.1.0