Bean Property Generator

Supports unit testing by dynamically creating bean objects and populating their fields to default values.

Лицензия

Лицензия

Группа

Группа

com.gregmarut.support
Идентификатор

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

test-beangen
Последняя версия

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

2.7-RELEASE
Дата

Дата

Тип

Тип

jar
Описание

Описание

Bean Property Generator
Supports unit testing by dynamically creating bean objects and populating their fields to default values.
Ссылка на сайт

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

https://github.com/gregmarut/test-beangen/
Система контроля версий

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

https://github.com/gregmarut/test-beangen/

Скачать test-beangen

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

<!-- https://jarcasting.com/artifacts/com.gregmarut.support/test-beangen/ -->
<dependency>
    <groupId>com.gregmarut.support</groupId>
    <artifactId>test-beangen</artifactId>
    <version>2.7-RELEASE</version>
</dependency>
// https://jarcasting.com/artifacts/com.gregmarut.support/test-beangen/
implementation 'com.gregmarut.support:test-beangen:2.7-RELEASE'
// https://jarcasting.com/artifacts/com.gregmarut.support/test-beangen/
implementation ("com.gregmarut.support:test-beangen:2.7-RELEASE")
'com.gregmarut.support:test-beangen:jar:2.7-RELEASE'
<dependency org="com.gregmarut.support" name="test-beangen" rev="2.7-RELEASE">
  <artifact name="test-beangen" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.gregmarut.support', module='test-beangen', version='2.7-RELEASE')
)
libraryDependencies += "com.gregmarut.support" % "test-beangen" % "2.7-RELEASE"
[com.gregmarut.support/test-beangen "2.7-RELEASE"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.7

test (2)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-log4j12 jar 1.7.7
junit : junit jar 4.4

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

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

test-beangen

Supports unit testing by dynamically creating bean objects and populating their fields to default values.

Maven Repository: http://mvnrepository.com/artifact/com.gregmarut.support/test-beangen

##Getting Started The easiest way to use the framework is to create a new BeanPropertyGenerator object and call the .get() method while passing in the class that you would like to be fully populated. The bean generator will then attempt to instantiate the class and traverse the entire object graph and recursively initialize all of the fields. It will then return an object with all of its fields initialized according to the default values or Rules (if any have been specified)

Example: BeanPropertyGenerator beanPropertyGenerator = new BeanPropertyGenerator(); SomeObject someObject = beanPropertyGenerator.get(SomeObject.class);

##Default Values By default, com.gregmarut.support.beangenerator.DefaultValues simply contains a Map of Class and Object which allows the framework to know what the default values should be considering the object type. If the map contains an object for a class, whenever that class is found, it is used instead of attempting to recursively initialize the object.

##Configuration BeanPropertyGenerator has a Properties object which stores the instructions for how fields are populated. These can be completely customized by either changing or setting new default values for a class, map concrete classes to interfaces, or set Rule objects that allow for unique values to be set based on attributes of the field name and type.

##Examples See the unit tests for more examples on how to use and configure the BeanPropertyGenerator to help automate your unit testing needs.

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

Версия
2.7-RELEASE
2.6.1-RELEASE
2.6-RELEASE
2.5-RELEASE
2.4-RELEASE
2.3-RELEASE
2.0
1.2.4