Hamcrest Matchers Library

Library of additional matchers for Hamcrest

Лицензия

Лицензия

Группа

Группа

com.btmatthews.hamcrest
Идентификатор

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

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

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

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Hamcrest Matchers Library
Library of additional matchers for Hamcrest
Ссылка на сайт

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

https://github.com/bmatthews68/hamcrest-matchers
Организация-разработчик

Организация-разработчик

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

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

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

Скачать hamcrest-matchers

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

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

Зависимости

compile (1)

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

test (2)

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

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

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

Hamcrest Matchers Library

The Hamcrest Matchers Library provides additional Matcher implementations that work with Hamcrest for use in checking the results of operations being unit tested.

Pattern Matching

  • matches - tests that the value matches a regular expression
  • doesNotMatch - tests that a value does not match a regular expression
import static org.hamcrest.MatcherAssert.assertThat;
import static com.btmatthews.hamcrest.PatternMatcher.matches;

import org.junit.Test;

class TestPatternMatching {

  @Test
  public void idStringIsNumeric() {
    final Biscuit biscuit = new Biscuit("1234", "Custard Cream"));
    assertThat("id string is numeric", biscuit.getId(), matches("\\d+"));
  }
}

Maven Central Coordinates

The Hamcrest Matchers Library has been published in Maven Central at the following coordinates:

<dependency>
    <groupId>com.btmatthews.hamcrest</groupId>
    <artifactId>hamcrest-matchers</artifactId>
    <version>1.0.0</version>
    <scope>test</scope>
</dependency>

License & Source Code

The Hamcrest Matchers Library is made available under the Apache License and the source code is hosted on GitHub at https://github.com/bmatthews68/hamcrest-matchers.

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

Версия
1.0.1
1.0.0