@@ -18,7 +18,7 @@ The purpose of this project is to generate full object graphs for use in test su
1818<dependency >
1919 <groupId >com.github.nylle</groupId >
2020 <artifactId >javafixture</artifactId >
21- <version >2.14 .0</version >
21+ <version >2.15 .0</version >
2222 <scope >test</scope >
2323</dependency >
2424```
@@ -317,7 +317,17 @@ Due to Java's limited annotation design, the following rules apply:
317317 be of type ` int ` and so on.
318318- The current implementation only supports up to 6 arguments per test method.
319319
320- ### Parameterized Tests With Random Injected Values
320+ #### Enums Are Supported
321+ ``` java
322+ @TestWithCases
323+ @TestCase (str1 = " VALUE1" , str2 = " VALUE1" )
324+ @TestCase (str1 = " VALUE2" , str2 = " VALUE2" )
325+ void canCreateEnumFromString(TestEnum testEnum, String string) {
326+ assertThat(testEnum). isEqualTo(TestEnum . valueOf(string));
327+ }
328+ ```
329+
330+ #### Random Injected Values
321331If you are using ` @TestWithFixture ` and want to make the test parameterized, you can do so by using the annotation ` @Fixture ` inline:
322332``` java
323333@TestWithCases
@@ -330,4 +340,4 @@ void testStringLength(String input, @Fixture TestDto fixture) {
330340```
331341The test will be run for every ` @TestCase ` -annotation injecting the provided and the randomly generated values into the test's arguments.
332342
333- ** The random values will be identical for all test-cases! **
343+ The random values will be identical for all test-cases.
0 commit comments