TestContainers :: Ganache

Ganache container for testing under Testcontainers.

Лицензия

Лицензия

Категории

Категории

Java Языки программирования Контейнер
Группа

Группа

io.github.ganchix
Идентификатор

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

testcontainers-java-module-ganache
Последняя версия

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

0.0.4
Дата

Дата

Тип

Тип

jar
Описание

Описание

TestContainers :: Ganache
Ganache container for testing under Testcontainers.
Ссылка на сайт

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

https://github.com/ganchix/testcontainers-java-module-ganache
Система контроля версий

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

https://github.com/ganchix/testcontainers-java-module-ganache/tree/master

Скачать testcontainers-java-module-ganache

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

<!-- https://jarcasting.com/artifacts/io.github.ganchix/testcontainers-java-module-ganache/ -->
<dependency>
    <groupId>io.github.ganchix</groupId>
    <artifactId>testcontainers-java-module-ganache</artifactId>
    <version>0.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.ganchix/testcontainers-java-module-ganache/
implementation 'io.github.ganchix:testcontainers-java-module-ganache:0.0.4'
// https://jarcasting.com/artifacts/io.github.ganchix/testcontainers-java-module-ganache/
implementation ("io.github.ganchix:testcontainers-java-module-ganache:0.0.4")
'io.github.ganchix:testcontainers-java-module-ganache:jar:0.0.4'
<dependency org="io.github.ganchix" name="testcontainers-java-module-ganache" rev="0.0.4">
  <artifact name="testcontainers-java-module-ganache" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.ganchix', module='testcontainers-java-module-ganache', version='0.0.4')
)
libraryDependencies += "io.github.ganchix" % "testcontainers-java-module-ganache" % "0.0.4"
[io.github.ganchix/testcontainers-java-module-ganache "0.0.4"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.testcontainers : testcontainers jar 1.6.0
commons-cli : commons-cli jar 1.4
org.web3j : core jar 3.4.0

provided (1)

Идентификатор библиотеки Тип Версия
org.projectlombok : lombok jar 1.16.20

test (1)

Идентификатор библиотеки Тип Версия
ch.qos.logback : logback-classic jar 1.2.3

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

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

TestContainers Ganache testing module Build Status codecov Maven Central GitHub stars

Testcontainers module for Ganache.

Table of Contents

Overview

A simple way to test Ethereum in your Java Code

See testcontainers.org for more information about Testcontainers.

Getting started

Add dependency

Maven
<dependency>
    <groupId>io.github.ganchix</groupId>
    <artifactId>testcontainers-java-module-ganache</artifactId>
    <version>0.0.4</version>
</dependency>
Gradle
compile group: 'io.github.ganchix', name: 'testcontainers-java-module-ganache', version: '0.0.4'

Code example

Running Ganache during a test:

public class SomeTest {


	@Rule
	public GanacheContainer GanacheContainer = new GanacheContainer();

    
	@Test
	public void simpleTestWithClientCreation() {
            Web3j web3j = ganacheContainer.getWeb3j();
            assertEquals( web3j.ethBlockNumber().send().getBlockNumber(), BigInteger.ZERO);
            assertNotNull(ganacheContainer);
	}
}

Considerations

To obtain the data of addresses and privates keys of console log we implemented a custom log consumer LogGanacheExtractorConsumer, if you overwrite it this information will not be extracted.

License

Testcontainers module for Ganache is licensed under the MIT License. See LICENSE for details.

Copyright (c) 2018 Rafael Ríos Moya

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

Версия
0.0.4
0.0.3
0.0.2
0.0.1