From 016cfe0d101320ff315e6e9c0712cdf811cc2bdf Mon Sep 17 00:00:00 2001 From: Jens Schulze Date: Fri, 15 Sep 2023 12:13:02 +0200 Subject: [PATCH] fix long property test values --- .../javalang/client/builder/test/JavaBuilderTestRenderer.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/languages/javalang/builder-renderer/java-builder-client/src/main/kotlin/io/vrap/codegen/languages/javalang/client/builder/test/JavaBuilderTestRenderer.kt b/languages/javalang/builder-renderer/java-builder-client/src/main/kotlin/io/vrap/codegen/languages/javalang/client/builder/test/JavaBuilderTestRenderer.kt index f44d4221..dad4fed2 100644 --- a/languages/javalang/builder-renderer/java-builder-client/src/main/kotlin/io/vrap/codegen/languages/javalang/client/builder/test/JavaBuilderTestRenderer.kt +++ b/languages/javalang/builder-renderer/java-builder-client/src/main/kotlin/io/vrap/codegen/languages/javalang/client/builder/test/JavaBuilderTestRenderer.kt @@ -108,12 +108,14 @@ class JavaBuilderTestRenderer constructor(override val vrapTypeProvider: VrapTyp is ArrayType -> "Collections.singletonList(${propertyValue(name, type.items, r)})" is BooleanType -> true is IntegerType -> when (type.format) { + NumberFormat.LONG, NumberFormat.INT64 -> "${r.nextInt(1, 10)}L" else -> r.nextInt(1, 10) } is NumberType -> when (type.format) { NumberFormat.DOUBLE -> r.nextDouble() NumberFormat.FLOAT -> r.nextFloat() + NumberFormat.LONG, NumberFormat.INT64 -> "${r.nextInt(1, 10)}L" else -> r.nextInt(1, 10) }