Skip to content

Commit e99f6f1

Browse files
authored
Merge pull request #162 from spannm/docs/update-readme-and-version
docs: update README structure and add Turkish locale
2 parents cc75fab + d9b52f1 commit e99f6f1

1 file changed

Lines changed: 32 additions & 27 deletions

File tree

README.md

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
# jFairy by Devskiller
22

3-
[![Build](https://github.com/SkillPanel/jfairy/actions/workflows/build.yml/badge.svg)](https://github.com/SkillPanel/jfairy/actions/workflows/build.yml) [![Maven Central](https://img.shields.io/maven-central/v/com.devskiller/jfairy)](https://central.sonatype.com/artifact/com.devskiller/jfairy) [![Javadocs](https://javadoc.io/badge2/com.devskiller/jfairy/javadoc.svg)](https://javadoc.io/doc/com.devskiller/jfairy)
3+
[](https://github.com/SkillPanel/jfairy/actions/workflows/build.yml)
4+
[](https://central.sonatype.com/artifact/com.devskiller/jfairy)
5+
[](https://javadoc.io/doc/com.devskiller/jfairy)
46

5-
Java fake data generator. Based on Wikipedia:
7+
Java fake data generator. According to Wikipedia:
68

79
> Fairyland, in folklore, is the fabulous land or abode of fairies or fays.
810
911
## Installation
1012

13+
Add the following dependency to your `pom.xml`:
14+
1115
```xml
1216
<dependency>
1317
<groupId>com.devskiller</groupId>
1418
<artifactId>jfairy</artifactId>
15-
<version>0.8.1</version>
19+
<version>0.8.2</version>
1620
</dependency>
1721
```
1822

1923
## Usage
2024

21-
Creating simple objects:
25+
### Creating simple objects
2226

2327
```java
2428
Fairy fairy = Fairy.create();
@@ -42,7 +46,7 @@ System.out.println(adultMale.getDateOfBirth());
4246
// at least 21 years earlier
4347
```
4448

45-
Creating related objects:
49+
### Creating related objects
4650

4751
```java
4852
Fairy fairy = Fairy.create();
@@ -61,19 +65,20 @@ System.out.println(salesman.getCompanyEmail());
6165

6266
## Supported locales
6367

64-
| Locale | Language tag |
65-
|--------|-------------|
66-
| English (default) | `en` |
67-
| Polish | `pl` |
68-
| German | `de` |
69-
| French | `fr` |
70-
| Spanish | `es` |
71-
| Swedish | `sv` |
72-
| Chinese | `zh` |
73-
| Georgian | `ka` |
74-
| Italian | `it` |
75-
| Brazilian Portuguese | `br` |
76-
| Slovak | `sk` |
68+
| Locale | Language tag |
69+
|:---------------------|:------------:|
70+
| English (default) | `en` |
71+
| Polish | `pl` |
72+
| German | `de` |
73+
| French | `fr` |
74+
| Spanish | `es` |
75+
| Swedish | `sv` |
76+
| Chinese | `zh` |
77+
| Georgian | `ka` |
78+
| Italian | `it` |
79+
| Brazilian Portuguese | `br` |
80+
| Slovak | `sk` |
81+
| Turkish | `tr` |
7782

7883
```java
7984
Fairy enFairy = Fairy.create();
@@ -102,20 +107,20 @@ Person p = unique.next();
102107

103108
## Thread safety
104109

105-
`Fairy` object should not be used concurrently by multiple threads. It is recommended to create `Fairy` instance for each thread.
106-
107-
Some methods are not thread-safe when multiple threads share the same `Fairy` object. For other methods it is still recommended to create a separate `Fairy` object, because `Random` object utilized underneath does not perform well when used concurrently by multiple threads.
108-
109-
## Other samples
110+
`Fairy` objects are not designed for concurrent use by multiple threads.
111+
It is recommended to create a separate `Fairy` instance for each thread.
110112

111-
Look into [code samples](https://github.com/SkillPanel/jfairy/tree/master/src/test/groovy/snippets/)
113+
While some methods might appear safe, the underlying `Random` implementation can lead to contention and poor performance. Creating dedicated instances ensures both thread safety and optimal execution speed.
112114

113115
## JUnit 5 Extension
114116

115-
If you use JUnit 5, check out [jfairy-junit-extension](https://github.com/SkillPanel/jfairy-junit-extension)a JUnit 5 extension that allows injecting jFairy-generated objects directly into test method parameters.
117+
If you use JUnit 5, check out [jfairy-junit-extension](https://github.com/SkillPanel/jfairy-junit-extension)an extension that allows injecting jFairy-generated objects directly into test method parameters.
116118

117119
## Building
118120

119-
This project can be built using maven command:
121+
This project uses Maven and can be built using the provided wrapper:
122+
123+
```bash
124+
./mvnw
125+
```
120126

121-
./mvnw install

0 commit comments

Comments
 (0)