<commit_before># environment-builder
The library is made for helping of creating POJO-classes objects in unit tests cases and database preparation in integration tests cases.
It may simply generate new objects and fill them with random data with org.envbuild.generator.RandomGenerator.
Or even more, it may prepare objects for saving them into a database with org.envbuild.environment.DbEnvironmentBuilder and preconfigured objects processors org.envbuild.generator.processor.DomainPostProcessor.

## Including artifacts into project
In common case for Maven projects, you might use the following dependency:
```xml   
    <dependency>
        <groupId>com.github.salamansar.envbuild</groupId>
        <artifactId>environment-builder</artifactId>
        <version>0.8</version>
    </dependency>
```
If you are using Spring framework, it will be useful to use spring-version of the library with preconfigured context-configs:
```xml   
    <dependency>
        <groupId>com.github.salamansar.envbuild</groupId>
        <artifactId>environment-builder-spring</artifactId>
        <version>0.8</version>
    </dependency>
```
## RandomGenerator
For creation of an object, org.envbuild.generator.RandomGenerator is used. 
```java
    RandomGenerator generator = new RandomGenerator();
    SomeClass obj = generator.generate(SomeClass.class); 
```
There SomeClass is a POJO-class, which contains simple fields like String, Double, etc, with getters and setters. After generation, it will be filled with random values.
If a class contains not-simple fields with some other class, then this field will not be filled by default. For recursive generations such objects, you might turn on this feature with the special flag:<commit_msg>0.8.1 in ReadMe<commit_after># environment-builder
The library is made for helping of creating POJO-classes objects in unit tests cases and database preparation in integration tests cases.
It may simply generate new objects and fill them with random data with org.envbuild.generator.RandomGenerator.
Or even more, it may prepare objects for saving them into a database with org.envbuild.environment.DbEnvironmentBuilder and preconfigured objects processors org.envbuild.generator.processor.DomainPostProcessor.

## Including artifacts into project
In common case for Maven projects, you might use the following dependency:
```xml   
    <dependency>
        <groupId>com.github.salamansar.envbuild</groupId>
        <artifactId>environment-builder</artifactId>
        <version>0.8.1</version>
    </dependency>
```
If you are using Spring framework, it will be useful to use spring-version of the library with preconfigured context-configs:
```xml   
    <dependency>
        <groupId>com.github.salamansar.envbuild</groupId>
        <artifactId>environment-builder-spring</artifactId>
        <version>0.8.1</version>
    </dependency>
```
## RandomGenerator
For creation of an object, org.envbuild.generator.RandomGenerator is used. 
```java
    RandomGenerator generator = new RandomGenerator();
    SomeClass obj = generator.generate(SomeClass.class); 
```
There SomeClass is a POJO-class, which contains simple fields like String, Double, etc, with getters and setters. After generation, it will be filled with random values.
If a class contains not-simple fields with some other class, then this field will not be filled by default. For recursive generations such objects, you might turn on this feature with the special flag:
{'fraction_non_alphanumeric': 0.07456647398843931, 'fraction_numerical': 0.0037572254335260114, 'mean_word_length': 4.433281004709576, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1389717', 'n_tokens_mistral': 886, 'n_tokens_neox': 835, 'n_words': 363}