From 061d1191f107fde0d8690348f9d8131ac7bccc29 Mon Sep 17 00:00:00 2001 From: Patryk Date: Fri, 17 Aug 2018 15:00:08 +0200 Subject: [PATCH] Bael 1704 (#4973) * BAEL-1704: Non-Trivial Work in Kotlin vs Java * BAEL-1704: Non-Trivial Work in Kotlin vs Java Renaming one test class * BAEL-1704: Kotlin vs Java * BAEL-1704: Kotlin vs Java The files moved to the guest branch. --- guest/core-kotlin/.gitignore | 14 ++ guest/core-kotlin/pom.xml | 199 ++++++++++++++++++ .../kotlinvsjava/CompanionObjectTest.kt | 0 .../baeldung/kotlinvsjava/ConstructorTest.kt | 0 .../baeldung/kotlinvsjava/DataClassTest.kt | 0 .../baeldung/kotlinvsjava/DelegationTest.kt | 0 .../baeldung/kotlinvsjava/ExceptionsTest.kt | 2 +- .../kotlinvsjava/ExtensionFunctionsTest.kt | 0 .../baeldung/kotlinvsjava/FunctionsTest.kt | 0 .../baeldung/kotlinvsjava/IsOperatorTest.kt | 0 .../baeldung/kotlinvsjava/NullSafetyTest.kt | 0 .../kotlinvsjava/OperatorsOverloadingTest.kt | 0 .../baeldung/kotlinvsjava/PropertiesTest.kt | 0 13 files changed, 214 insertions(+), 1 deletion(-) create mode 100644 guest/core-kotlin/.gitignore create mode 100644 guest/core-kotlin/pom.xml rename {core-kotlin => guest/core-kotlin}/src/test/kotlin/com/baeldung/kotlinvsjava/CompanionObjectTest.kt (100%) rename {core-kotlin => guest/core-kotlin}/src/test/kotlin/com/baeldung/kotlinvsjava/ConstructorTest.kt (100%) rename {core-kotlin => guest/core-kotlin}/src/test/kotlin/com/baeldung/kotlinvsjava/DataClassTest.kt (100%) rename {core-kotlin => guest/core-kotlin}/src/test/kotlin/com/baeldung/kotlinvsjava/DelegationTest.kt (100%) rename {core-kotlin => guest/core-kotlin}/src/test/kotlin/com/baeldung/kotlinvsjava/ExceptionsTest.kt (88%) rename {core-kotlin => guest/core-kotlin}/src/test/kotlin/com/baeldung/kotlinvsjava/ExtensionFunctionsTest.kt (100%) rename {core-kotlin => guest/core-kotlin}/src/test/kotlin/com/baeldung/kotlinvsjava/FunctionsTest.kt (100%) rename {core-kotlin => guest/core-kotlin}/src/test/kotlin/com/baeldung/kotlinvsjava/IsOperatorTest.kt (100%) rename {core-kotlin => guest/core-kotlin}/src/test/kotlin/com/baeldung/kotlinvsjava/NullSafetyTest.kt (100%) rename {core-kotlin => guest/core-kotlin}/src/test/kotlin/com/baeldung/kotlinvsjava/OperatorsOverloadingTest.kt (100%) rename {core-kotlin => guest/core-kotlin}/src/test/kotlin/com/baeldung/kotlinvsjava/PropertiesTest.kt (100%) diff --git a/guest/core-kotlin/.gitignore b/guest/core-kotlin/.gitignore new file mode 100644 index 000000000000..0c017e8f8cc6 --- /dev/null +++ b/guest/core-kotlin/.gitignore @@ -0,0 +1,14 @@ +/bin/ + +#ignore gradle +.gradle/ + + +#ignore build and generated files +build/ +node/ +out/ + +#ignore installed node modules and package lock file +node_modules/ +package-lock.json diff --git a/guest/core-kotlin/pom.xml b/guest/core-kotlin/pom.xml new file mode 100644 index 000000000000..6b189143a412 --- /dev/null +++ b/guest/core-kotlin/pom.xml @@ -0,0 +1,199 @@ + + + 4.0.0 + core-kotlin + 1.0-SNAPSHOT + com.stackify + jar + + + + jcenter + http://jcenter.bintray.com + + + + + + org.junit.platform + junit-platform-runner + ${junit.platform.version} + test + + + org.jetbrains.kotlin + kotlin-stdlib + ${kotlin-stdlib.version} + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + ${kotlin-stdlib.version} + + + org.jetbrains.kotlin + kotlin-test-junit + ${kotlin-test-junit.version} + test + + + org.jetbrains.kotlin + kotlin-reflect + ${kotlin-reflect.version} + + + org.jetbrains.spek + spek-api + 1.1.5 + test + + + org.jetbrains.spek + spek-subject-extension + 1.1.5 + test + + + org.jetbrains.spek + spek-junit-platform-engine + 1.1.5 + test + + + com.nhaarman + mockito-kotlin + ${mockito-kotlin.version} + test + + + org.assertj + assertj-core + ${assertj.version} + test + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + org.apache.maven.plugins + maven-failsafe-plugin + ${maven-failsafe-plugin.version} + test + + + org.jetbrains.kotlin + kotlin-maven-plugin + ${kotlin-maven-plugin.version} + provided + + + + + + + org.jetbrains.kotlin + kotlin-maven-plugin + ${kotlin-maven-plugin.version} + + + compile + + compile + + + + ${project.basedir}/src/main/kotlin + + + + + test-compile + + test-compile + + + + ${project.basedir}/src/test/kotlin + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + ${java.version} + ${java.version} + + + + + default-compile + none + + + + default-testCompile + none + + + java-compile + compile + + compile + + + + + + maven-failsafe-plugin + ${maven-failsafe-plugin.version} + + + org.junit.platform + junit-platform-surefire-provider + ${junit.platform.version} + + + + + junit5 + + integration-test + verify + + + + **/*Test5.java + + + + + + + + + + 2.22.0 + UTF-8 + 1.2.60 + 1.2.51 + 1.2.51 + 1.2.51 + 0.22.5 + 1.5.0 + 3.6.1 + 1.0.0 + 5.2.0 + 3.10.0 + 3.7.0 + + + diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/CompanionObjectTest.kt b/guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/CompanionObjectTest.kt similarity index 100% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/CompanionObjectTest.kt rename to guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/CompanionObjectTest.kt diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/ConstructorTest.kt b/guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/ConstructorTest.kt similarity index 100% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/ConstructorTest.kt rename to guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/ConstructorTest.kt diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/DataClassTest.kt b/guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/DataClassTest.kt similarity index 100% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/DataClassTest.kt rename to guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/DataClassTest.kt diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/DelegationTest.kt b/guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/DelegationTest.kt similarity index 100% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/DelegationTest.kt rename to guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/DelegationTest.kt diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/ExceptionsTest.kt b/guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/ExceptionsTest.kt similarity index 88% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/ExceptionsTest.kt rename to guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/ExceptionsTest.kt index d1b339054421..073c4dd8908a 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/ExceptionsTest.kt +++ b/guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/ExceptionsTest.kt @@ -24,7 +24,7 @@ class ExceptionsTest { fun givenANullString_whenUsingElvisOperator_thenExceptionIsThrown() { val sampleString: String? = null - val length: Int = sampleString?.length ?: throw IllegalArgumentException("String must not be null") + sampleString?.length ?: throw IllegalArgumentException("String must not be null") } private fun funThrowingException(): Nothing { diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/ExtensionFunctionsTest.kt b/guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/ExtensionFunctionsTest.kt similarity index 100% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/ExtensionFunctionsTest.kt rename to guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/ExtensionFunctionsTest.kt diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/FunctionsTest.kt b/guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/FunctionsTest.kt similarity index 100% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/FunctionsTest.kt rename to guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/FunctionsTest.kt diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/IsOperatorTest.kt b/guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/IsOperatorTest.kt similarity index 100% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/IsOperatorTest.kt rename to guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/IsOperatorTest.kt diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/NullSafetyTest.kt b/guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/NullSafetyTest.kt similarity index 100% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/NullSafetyTest.kt rename to guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/NullSafetyTest.kt diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/OperatorsOverloadingTest.kt b/guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/OperatorsOverloadingTest.kt similarity index 100% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/OperatorsOverloadingTest.kt rename to guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/OperatorsOverloadingTest.kt diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/PropertiesTest.kt b/guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/PropertiesTest.kt similarity index 100% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/PropertiesTest.kt rename to guest/core-kotlin/src/test/kotlin/com/baeldung/kotlinvsjava/PropertiesTest.kt