Patere

https://github.com/lkrnac/patere

Лицензия

Лицензия

Категории

Категории

Сеть
Группа

Группа

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

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

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

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

0.2.4
Дата

Дата

Тип

Тип

jar
Описание

Описание

Patere
https://github.com/lkrnac/patere
Ссылка на сайт

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

https://github.com/lkrnac/patere
Система контроля версий

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

https://github.com/lkrnac/patere

Скачать patere

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

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.apache.commons : commons-lang3 jar 3.2.1

test (2)

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

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

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

Patere

Tiny library for building path of test resources based on package, class name and optionally test method name. This can help keep test suite organized if it heavily uses some file resources. Developer can just drop resources belonging to the test into directory of certain structure and use Patere in test to build the test resources path.

It uses stack trace of current thread to build the path, therefore it's not suitable for production.

Uses Java 7.

Maven dependency

<dependency>
	<groupId>net.lkrnac.lib</groupId>
	<artifactId>patere</artifactId>
	<version>${version}</version>
	<scope>test</scope>
</dependency>

Find version in GitHub releases tab.

API

JavaDoc of current development branch

Examples

If stack trace is net.lkrnac.someapp.AppTest.testSomeMethod(), Patere builds following test resource paths:

String testResourcesPath = new Patere().getResourcesPathForMethod(); 
//testResourcesPath == "src/test/resources/net.lkrnac.someapp/AppTest/testSomeMethod/"

testResourcesPath = new Patere(false).getResourcesPathForMethod(); 
//testResourcesPath == "src/test/resources/net/lkrnac/someapp/AppTest/testSomeMethod/"

testResourcesPath = new Patere().getResourcesPathForClass(this.getClass.getName()); 
//testResourcesPath == "src/test/resources/net.lkrnac.someapp/AppTest/"

testResourcesPath = new Patere(false).getResourcesPathForClass(this.getClass.getName()); 
//testResourcesPath == "src/test/resources/net/lkrnac/someapp/AppTest/"

testResourcesPath = new Patere("test").getResourcesPathForClass(this.getClass.getName()); 
//testResourcesPath == "test/net/lkrnac/someapp/AppTest/"

##Development

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

Версия
0.2.4