Skip to content

Commit

Permalink
✨ (JUnit4): Handle enum fields annotated with @forgery
Browse files Browse the repository at this point in the history
  • Loading branch information
xgouchet committed Dec 9, 2019
1 parent 22d19d4 commit 7aebe7a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import fr.xgouchet.elmyr.junit4.dummy.Bar
import fr.xgouchet.elmyr.junit4.dummy.BarFactory
import fr.xgouchet.elmyr.junit4.dummy.Foo
import fr.xgouchet.elmyr.junit4.dummy.FooFactory
import java.time.Month
import org.assertj.core.api.Assertions.assertThat
import org.junit.Before
import org.junit.Rule
Expand All @@ -30,6 +31,9 @@ class KotlinAnnotationTest {
@Forgery
lateinit var fakeFooMap: Map<Foo, Bar>

@Forgery
lateinit var fakeMonth: Month

@Before
fun setUp() {
checkSeedChanged()
Expand Down Expand Up @@ -64,6 +68,8 @@ class KotlinAnnotationTest {
assertThat(fakeFooList).isNotNull.isNotEmpty
assertThat(fakeFooSet).isNotNull.isNotEmpty
assertThat(fakeFooMap).isNotNull.isNotEmpty

assertThat(fakeMonth).isNotNull()
}

// endregion
Expand Down

0 comments on commit 7aebe7a

Please sign in to comment.