diff --git a/core/src/main/kotlin/fr/xgouchet/elmyr/Forge.kt b/core/src/main/kotlin/fr/xgouchet/elmyr/Forge.kt index 348995a..d524021 100644 --- a/core/src/main/kotlin/fr/xgouchet/elmyr/Forge.kt +++ b/core/src/main/kotlin/fr/xgouchet/elmyr/Forge.kt @@ -11,8 +11,6 @@ import kotlin.math.sqrt /** * The base class to generate forgeries. - * - * TODO include examples of all that's possible */ @Suppress("TooManyFunctions", "MethodOverloading") open class Forge { diff --git a/core/src/test/kotlin/fr/xgouchet/elmyr/ForgeBooleanSpek.kt b/core/src/test/kotlin/fr/xgouchet/elmyr/ForgeBooleanSpek.kt index 26d2f77..25ef380 100644 --- a/core/src/test/kotlin/fr/xgouchet/elmyr/ForgeBooleanSpek.kt +++ b/core/src/test/kotlin/fr/xgouchet/elmyr/ForgeBooleanSpek.kt @@ -21,7 +21,7 @@ class ForgeBooleanSpek : Spek({ } it("forges random boolean with probability") { - val probability = 0.13f // TODO random + val probability = forge.aFloat(0f, 1f) verifyProbability(probability) { forge.aBool(probability) } } } diff --git a/core/src/test/kotlin/fr/xgouchet/elmyr/ForgeDelegateSpek.kt b/core/src/test/kotlin/fr/xgouchet/elmyr/ForgeDelegateSpek.kt index 981efdb..a4f0ab5 100644 --- a/core/src/test/kotlin/fr/xgouchet/elmyr/ForgeDelegateSpek.kt +++ b/core/src/test/kotlin/fr/xgouchet/elmyr/ForgeDelegateSpek.kt @@ -35,7 +35,7 @@ class ForgeDelegateSpek : Spek({ context("in a class with nullable properties") { it("forges a nullable instance") { - val probability = 0.13f // TODO random + val probability = forge.aFloat(0f, 1f) verifyProbability(expectedProbability = probability) { val temp = WithNullable(forge, probability) temp.forgedNullableBoolean == null @@ -43,7 +43,7 @@ class ForgeDelegateSpek : Spek({ } it("forges a nullable instance with default probability") { - val probability = 0.13f // TODO random + val probability = forge.aFloat(0f, 1f) verifyProbability(expectedProbability = Forge.HALF_PROBABILITY) { val temp = WithNullable(forge, probability) temp.forgedNullableBooleanHalf == null @@ -51,7 +51,7 @@ class ForgeDelegateSpek : Spek({ } it("forges a nullable instance from Lambda") { - val probability = 0.13f // TODO random + val probability = forge.aFloat(0f, 1f) verifyProbability(expectedProbability = probability) { val temp = WithNullable(forge, probability) temp.forgedNullableInt == null @@ -59,7 +59,7 @@ class ForgeDelegateSpek : Spek({ } it("forges a nullable instance from Lambda with default probability") { - val probability = 0.13f // TODO random + val probability = forge.aFloat(0f, 1f) verifyProbability(expectedProbability = Forge.HALF_PROBABILITY) { val temp = WithNullable(forge, probability) temp.forgedNullableIntHalf == null @@ -70,7 +70,7 @@ class ForgeDelegateSpek : Spek({ context("in a class with boolean properties") { it("forges a boolean instance") { - val probability = 0.13f // TODO random + val probability = forge.aFloat(0f, 1f) verifyProbability( expectedProbability = probability ) { diff --git a/junit5/src/test/kotlin/fr/xgouchet/elmyr/junit5/MockParameterContext.kt b/junit5/src/test/kotlin/fr/xgouchet/elmyr/junit5/MockParameterContext.kt index 5fc8c0b..0985f25 100644 --- a/junit5/src/test/kotlin/fr/xgouchet/elmyr/junit5/MockParameterContext.kt +++ b/junit5/src/test/kotlin/fr/xgouchet/elmyr/junit5/MockParameterContext.kt @@ -12,7 +12,7 @@ class MockParameterContext( ) : ParameterContext { override fun findRepeatableAnnotations(annotationType: Class?): MutableList { - TODO("not implemented") // To change body of created functions use File | Settings | File Templates. + return mutableListOf() } override fun findAnnotation(annotationType: Class?): Optional { @@ -28,7 +28,7 @@ class MockParameterContext( } override fun getTarget(): Optional { - TODO("not implemented") // To change body of created functions use File | Settings | File Templates. + return Optional.empty() } override fun isAnnotated(annotationType: Class?): Boolean {