org.eluder.juniter:juniter-core

Framework that provides additional features to JUnit

Лицензия

Лицензия

Категории

Категории

JUnit Тестирование компонентов
Группа

Группа

org.eluder.juniter
Идентификатор

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

juniter-core
Последняя версия

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

1.1.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

Framework that provides additional features to JUnit
Организация-разработчик

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

Tapio Rautonen

Скачать juniter-core

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

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

Зависимости

compile (4)

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

test (3)

Идентификатор библиотеки Тип Версия
org.mockito : mockito-all jar 1.9.5
org.slf4j : slf4j-log4j12 jar 1.7.2
org.slf4j : jcl-over-slf4j jar 1.7.2

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

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

juniter

Framework that extends JUnit functionality. Adds alternative approach for test rules, automatic mocking, context creation in guice and reflection assert utilities. The project juniter uses semantic versioning and tagging to provide clean version numbers.

Test life cycle

Test life cycle org.eluder.juniter.core.TestLifeCycle provides the hooks to different phases of a unit test. The main reason for custom interface over the JUnit org.junit.rules.TestRule interface is that the test rules do not allow access to the test instance.

Comparison between the TestLifeCycle and TestRule interfaces:

TestLifeCycle TestRule
Easy access to test instance yes no
Easy access to test class yes yes
Easy access to test method yes no
Must reset its own state after each test no yes
Requires a custom JUnit runner yes no

Usage

Core module requires the following dependency:

<dependency>
    <groupId>org.eluder.juniter</groupId>
    <artifactId>juniter-core</artifactId>
    <version>1.2.0-SNAPSHOT</version>
</dependency>

Using test life cycles requires defining the juniter test runner and defining the life cycles to use:

@RunWith(TestRunner.class)
@TestLifeCycles({ FirstLifeCycle.class, SecondLifeCycle.class })
public class MyTest {
    ...
}

Automatic mocking can be achieved with the shorthand mock runner or defining the mock life cycle as one test life cycle:

@RunWith(MockTestRunner.class)
public class MockTest {
    ...
}

is equivalent to

@RunWith(TestRunner.class)
@TestLifeCycles({ MockLifeCycle.class })
public class MockTest {
    ...
}

Guice integration requires the following dependency:

<dependency>
    <groupId>org.eluder.juniter</groupId>
    <artifactId>juniter-guice</artifactId>
    <version>1.2.0-SNAPSHOT</version>
</dependency>

Continuous integration

Travis CI builds juniter with Oracle JDK 7 and OpenJDK 6.

Build Status

License

The project juniter is licensed under the MIT license.

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

Версия
1.1.2
1.1.1
1.1.0
1.0.0