net.markenwerk:utils-json-handler-replay

Replaying handler for JSON processing libraries for Java

Лицензия

Лицензия

Категории

Категории

Сеть JSON Данные
Группа

Группа

net.markenwerk
Идентификатор

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

utils-json-handler-replay
Последняя версия

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

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

net.markenwerk:utils-json-handler-replay
Replaying handler for JSON processing libraries for Java
Ссылка на сайт

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

https://github.com/markenwerk/java-utils-json-handler-replay
Организация-разработчик

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

Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH
Система контроля версий

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

https://github.com/markenwerk/java-utils-json-handler-replay

Скачать utils-json-handler-replay

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

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
net.markenwerk : utils-json-handler jar 2.0.1

test (1)

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

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

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

Replaying handler for JSON libraries

Build Status Coverage Status Dependency Status Maven Central Issues MIT License

Overview

This library provides a replaying JSON handlers for other JSON processing libraries.

Consult the documentation and the usage description for further information:

Maven

This library is hosted in the Maven Central Repository. You can use it with the following coordinates:

<dependency>
	<groupId>net.markenwerk</groupId>
	<artifactId>utils-json-handler-replay</artifactId>
	<version>1.0.1</version>
</dependency>

Usage

Replaying handler

A RecordingJsonHandler is a JsonHandler that creates a JsonReplay of the described JSON document. A JsonReplay represents a sequence of JsonEvents and is able to replay these events to another JsonHandler.

// a JsonDocument
JsonDocument document = ...

// a JsonHandler
JsonHandler handler = ...

// returns a JsonReplay  
JsonReplay replay = document.handle(new RecordingJsonHandler());

// replay the JsonDocument to the JsonHandler
replay.replay(handler); 

A RecordingJsonHandler is useful when testing a component that takes a JsonHandler, because the generated JsonReplay can be used to easily check, if the correct callback methods have been called.

// a JsonReplay
JsonReply replay = ...

// check the replay against an expected sequence of JsonEvents
replay.assertEquals(
	new DocumentBeginJsonEvent(),
	new NullJsonEvent(),
	new DocumentEndJsonEvent(),
);
net.markenwerk

Markenwerk

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

Версия
1.0.1
1.0.0