Hamcrest-Matchers

a library containing hamcrest matchers

Лицензия

Лицензия

Группа

Группа

at.meks
Идентификатор

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

hamcrest-matchers
Последняя версия

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

0.1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Hamcrest-Matchers
a library containing hamcrest matchers
Ссылка на сайт

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

https://github.com/meks77/hamcrest-matchers
Система контроля версий

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

https://github.com/meks77/hamcrest-matchers

Скачать hamcrest-matchers

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

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

Зависимости

runtime (1)

Идентификатор библиотеки Тип Версия
org.hamcrest : hamcrest-core jar 2.1

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

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

Sonarcloud Status Sonarcloud Status Sonarcloud Status Sonarcloud Status Sonarcloud Status Sonarcloud Status Sonarcloud Status Sonarcloud Status Sonarcloud Status

hamcrest-matchers

A collection of matchers for hamcrest assertions. Currently it's not started. But soon it will provide the possibility to assert the content of a zip file.

Matchers

Zip File matcher

In the first step only the file structure(directories and filenames), the size, last modified date and the content of the file are compared. The diff of the content is only provided by an sha1 string. Providing the content a byte array or encoded string isn't that usefull.

Usage

Maven Dependency:

<dependency>
    <groupId>at.meks</groupId>
    <artifactId>hamcrest-matchers</artifactId>
    <version>${version}</version>
</dependency>

Pleas replace ${version} with the version you want to use.

import at.meks.hamcrest.matchers.zip.ZipFileMatcher;

public class ExampleTest {
    
    @Test
    public void testZipFile() {
        Path expectedZip = Paths.get(getClass().getResource("/expected.zip").toURI());
        Path actualZip = Paths.get(getClass().getResource("/compared.zip").toURI());
        assertThat(actual, ZipFileMatcher.matchesWithNameLastModifiedAndContent(expected));
    }
    
}

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

Версия
0.1.1
0.1.0