8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
val fixtureMonkey = FixtureMonkey.builder() .enableLoggingFail(false) .defaultNotNull(true) .objectIntrospector( FailoverIntrospector( listOf( ConstructorPropertiesArbitraryIntrospector.INSTANCE, BuilderArbitraryIntrospector.INSTANCE ), ), ) .plugin { KotlinPlugin() JqwikPlugin().javaTypeArbitraryGenerator( object : JavaTypeArbitraryGenerator { override fun strings(): StringArbitrary { return Arbitraries.strings().ofMinLength(8).ofMaxLength(12) } }, ) } .build()
위와 같이 세팅하고 string을 giveMeOne 하는데 length가 예상한 바와 다르게 동작하는 것 같습니다. java에서는 위와 같이 세팅하고 사용하고는 했는데 위 세팅으로 kotlin에서도 예상한 바와 같이 동작하지 않는 것이 맞나요?
The text was updated successfully, but these errors were encountered:
@newkayak12 님 안녕하세요.
특별한 경우를 제외하고는 자바와 코틀린은 동작이 동일한데요, 혹시 예시가 실제 사용하고 계신 경우가 맞을까요? 만약 KotestPlugin도 추가하고 계시다면 JqwikPlugin의 동작이 적용이 안될수는 있습니다.
KotestPlugin
JqwikPlugin
재현 가능한 케이스를 공유해주시면 더 자세히 확인해드릴 수 있습니다.
감사합니다.
Sorry, something went wrong.
@seongahjo 따로 KotestPlugin을 추가하고 있지는 않습니다. 반복해서 사용해보고 있는데 특히 string의 length쪽 조절이 안되는 것 같습니다.
// monkey 선언 val monkey = FixtureMonkey .builder() .defaultNotNull(true) .enableLoggingFail(false) .objectIntrospector( FailoverIntrospector( listOf( FieldReflectionArbitraryIntrospector.INSTANCE, ConstructorPropertiesArbitraryIntrospector.INSTANCE, ), ), ) .plugin(KotlinPlugin()) .plugin( SimpleValueJqwikPlugin().minStringLength(8)) .build() // dataClass data class TestDataClass ( val testString: String ) // 사용 예시 val query = monkey <TestDataClass >()
와 같이 사용합니다. plugin의 경우 SImpleValueJqwikPlugin 혹은 위에서 기술한 JqwikPlugin을 사용할 때도 있습니다.
SImpleValueJqwikPlugin
No branches or pull requests
위와 같이 세팅하고 string을 giveMeOne 하는데 length가 예상한 바와 다르게 동작하는 것 같습니다.
java에서는 위와 같이 세팅하고 사용하고는 했는데 위 세팅으로 kotlin에서도 예상한 바와 같이 동작하지 않는 것이 맞나요?
The text was updated successfully, but these errors were encountered: