Commit 115df53 Simon Wirtz
committed
1 parent d90ac7e commit 115df53 Copy full SHA for 115df53
File tree 3 files changed +15
-4
lines changed
main/kotlin/de/swirtz/sample
test/kotlin/de/swirtz/sample
3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ dependencies {
11
11
implementation(kotlin(" reflect" ))
12
12
implementation(" org.slf4j:slf4j-api:1.7.30" )
13
13
implementation(" ch.qos.logback:logback-classic:1.2.3" )
14
- implementation(" de.swirtz:ktsRunner:0.0.9 " )
14
+ implementation(" de.swirtz:ktsRunner:0.0.8 " )
15
15
16
16
testImplementation(" org.junit.jupiter:junit-jupiter-api:5.7.0" )
17
17
testImplementation(" org.junit.jupiter:junit-jupiter-engine:5.7.0" )
Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ package de.swirtz.sample
2
2
3
3
import de.swirtz.ktsrunner.objectloader.KtsObjectLoader
4
4
5
- fun main () {
5
+ fun readRandomValueFromScript (): Int {
6
6
println (" Hello Kotlin Scripting World" )
7
- val i = KtsObjectLoader ().load<Int >(" val x = 10; x" )
8
- println (i)
7
+ return KtsObjectLoader ().load(" val x = 10; x" )
9
8
}
Original file line number Diff line number Diff line change
1
+ package de.swirtz.sample
2
+
3
+ import org.assertj.core.api.Assertions.assertThat
4
+ import org.junit.jupiter.api.Test
5
+
6
+ class SampleAppTest
7
+ {
8
+ @Test
9
+ fun `can get random value from script` (){
10
+ assertThat(readRandomValueFromScript()).isEqualTo(10 )
11
+ }
12
+ }
You can’t perform that action at this time.
0 commit comments