junit-doc

Small helper-classes for junit-documentation follwing the AAA-Pattern.

Лицензия

Лицензия

Категории

Категории

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

Группа

de.ppi.oss
Идентификатор

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

junit-doc
Последняя версия

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

0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

junit-doc
Small helper-classes for junit-documentation follwing the AAA-Pattern.
Ссылка на сайт

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

https://github.com/ppi-ag/junit-doc
Организация-разработчик

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

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

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

https://github.com/ppi-ag/junit-doc

Скачать junit-doc

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

<!-- https://jarcasting.com/artifacts/de.ppi.oss/junit-doc/ -->
<dependency>
    <groupId>de.ppi.oss</groupId>
    <artifactId>junit-doc</artifactId>
    <version>0.2</version>
</dependency>
// https://jarcasting.com/artifacts/de.ppi.oss/junit-doc/
implementation 'de.ppi.oss:junit-doc:0.2'
// https://jarcasting.com/artifacts/de.ppi.oss/junit-doc/
implementation ("de.ppi.oss:junit-doc:0.2")
'de.ppi.oss:junit-doc:jar:0.2'
<dependency org="de.ppi.oss" name="junit-doc" rev="0.2">
  <artifact name="junit-doc" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.ppi.oss', module='junit-doc', version='0.2')
)
libraryDependencies += "de.ppi.oss" % "junit-doc" % "0.2"
[de.ppi.oss/junit-doc "0.2"]

Зависимости

provided (1)

Идентификатор библиотеки Тип Версия
junit : junit jar [4.9,)

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

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

junit-doc

A small helper-classes to add easily junit-documenation, inspired by the work of Mario Gleichmann.

If you want to use it add the following dependency to your pom.

<dependency>
    <groupId>de.ppi.oss</groupId>
    <artifactId>junit-doc</artifactId>
    <version>0.2</version>
</dependency>

The idea is that you use methods instead of comments. So normally you would write

//ARRANGE create an an empty stack
Stack<Integer> stack = new Stack<Integer>();
//ACT pushing an element onto the stack
stack.push(Integer.valueOf(42));
//ASSUME the stack shouldn't be empty anymore
assertFalse(stack.isEmpty());

now you wrote

ARRANGE("an empty stack");
Stack<Integer> stack = new Stack<Integer>();
ACT("pushing an element onto the stack");
stack.push(Integer.valueOf(42));
ASSUME("the stack shouldn't be empty anymore");
assertFalse(stack.isEmpty());

and can get a simple console report

ARRANGE - an empty set
ACT - adding an element to the set
ASSUME - the set should'nt be empty anymore
 => Test successful

You can easily write more sophisticated reporter. Feel free to send pull-request of your implementation.

See /junit-doc/src/test/java/aaa/demo/StackTest.java for an example.

de.ppi.oss

PPI Informationstechnologie

http://www.ppi.de

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

Версия
0.2