File tree Expand file tree Collapse file tree 15 files changed +389
-491
lines changed
src/test/kotlin/org/reduxkotlin/examples/counter
src/test/kotlin/org/reduxkotlin/examples/todos
src/jvmTest/kotlin/org/reduxkotlin/util
commonTest/kotlin/org/reduxkotlin
jvmTest/kotlin/org/reduxkotlin/util Expand file tree Collapse file tree 15 files changed +389
-491
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ allprojects {
2626 jcenter()
2727 maven(" https://kotlin.bintray.com/kotlinx" )
2828 maven(" https://oss.sonatype.org/content/repositories/snapshots" )
29- maven(" https://dl.bintray.com/spekframework/spek-dev" )
3029 mavenCentral()
3130 }
3231
Original file line number Diff line number Diff line change @@ -23,18 +23,6 @@ object Libs {
2323 */
2424 const val recyclerview: String = " androidx.recyclerview:recyclerview:" + Versions .recyclerview
2525
26- /* *
27- * https://github.com/robstoll/atrium
28- */
29- const val atrium_cc_en_gb_robstoll_common: String =
30- " ch.tutteli.atrium:atrium-cc-en_GB-robstoll-common:" + Versions .ch_tutteli_atrium
31-
32- /* *
33- * https://github.com/robstoll/atrium
34- */
35- const val atrium_cc_en_gb_robstoll: String = " ch.tutteli.atrium:atrium-cc-en_GB-robstoll:" +
36- Versions .ch_tutteli_atrium
37-
3826 /* *
3927 * https://developer.android.com/studio
4028 */
@@ -192,13 +180,4 @@ object Libs {
192180 */
193181 const val kotlinx_coroutines_test: String = " org.jetbrains.kotlinx:kotlinx-coroutines-test:" +
194182 Versions .kotlinx_coroutines_test
195-
196- const val spek_dsl_jvm: String = " org.spekframework.spek2:spek-dsl-jvm:" +
197- Versions .org_spekframework_spek2
198-
199- const val spek_dsl_metadata: String = " org.spekframework.spek2:spek-dsl-metadata:" +
200- Versions .org_spekframework_spek2
201-
202- const val spek_runner_junit5: String = " org.spekframework.spek2:spek-runner-junit5:" +
203- Versions .org_spekframework_spek2
204183}
Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ object Versions {
1818
1919 const val recyclerview: String = " 1.0.0" // available: "1.1.0"
2020
21- const val ch_tutteli_atrium: String = " 0.9.2" // available: "0.12.0"
22-
2321 const val aapt2: String = " 3.6.0-6040484" // available: "4.0.1-6197926"
2422
2523 const val com_android_tools_build_gradle: String = " 3.6.0" // available: "4.0.1"
@@ -44,9 +42,6 @@ object Versions {
4442
4543 const val kotlinx_coroutines_test: String = " 1.3.8-1.4.0-rc"
4644
47- const val org_spekframework_spek2: String = " 2.1.0-alpha.0.11+d97ef33"
48- // available: "2.1.0-alpha.0.24+0fdeb6e"
49-
5045 /* *
5146 *
5247 * See issue 19: How to update Gradle itself?
Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ android {
3434 }
3535}
3636
37-
3837dependencies {
3938 implementation(Libs .kotlin_stdlib_jdk8)
4039 implementation(Libs .appcompat)
Original file line number Diff line number Diff line change @@ -3,10 +3,6 @@ plugins {
33 kotlin(" multiplatform" )
44}
55
6- repositories {
7- maven(" https://dl.bintray.com/spekframework/spek-dev" )
8- }
9-
106kotlin {
117 jvm()
128 js(IR ) {
@@ -33,24 +29,16 @@ kotlin {
3329 }
3430 }
3531 commonTest {
36- kotlin.srcDir(" src/test/kotlin" )
3732 dependencies {
3833 implementation(kotlin(" test-common" ))
3934 implementation(kotlin(" test-annotations-common" ))
40- implementation(" org.spekframework.spek2:spek-dsl-metadata:${Versions .org_spekframework_spek2} " )
41- implementation(" ch.tutteli.atrium:atrium-cc-en_GB-robstoll-common:${Versions .org_spekframework_spek2} " )
4235 implementation(" io.mockk:mockk-common:${Versions .io_mockk} " )
4336 }
4437 }
4538 val jvmTest by getting {
4639 dependencies {
4740 implementation(kotlin(" test" ))
4841 implementation(kotlin(" test-junit" ))
49- implementation(" org.spekframework.spek2:spek-dsl-jvm:${Versions .org_spekframework_spek2} " )
50- implementation(" ch.tutteli.atrium:atrium-cc-en_GB-robstoll:${Versions .ch_tutteli_atrium} " )
51- implementation(" io.mockk:mockk:${Versions .ch_tutteli_atrium} " )
52-
53- runtimeOnly(" org.spekframework.spek2:spek-runner-junit5:${Versions .org_spekframework_spek2} " )
5442 runtimeOnly(" org.jetbrains.kotlin:kotlin-reflect" )
5543 }
5644 }
@@ -62,11 +50,3 @@ kotlin {
6250 }
6351 }
6452}
65-
66- tasks {
67- val jvmTest by getting(Test ::class ) {
68- useJUnitPlatform {
69- includeEngines(" spek2" )
70- }
71- }
72- }
Original file line number Diff line number Diff line change 11package org.reduxkotlin.examples.counter
22
3- import ch.tutteli.atrium.api.cc.en_GB.toBe
4- import org.spekframework.spek2.Spek
5- import org.spekframework.spek2.style.specification.describe
6- import ch.tutteli.atrium.verbs.expect
3+ import kotlin.test.Test
4+ import kotlin.test.expect
75
6+ class CounterTest {
87
9- object CounterSpek : Spek({
10-
11- describe("reducers") {
12- describe("counter") {
13- it("should handle INCREMENT action") {
14- expect(reducer(1, Increment ())).toBe(2)
15- }
8+ @Test
9+ fun shouldHandleINCREMENTAction () {
10+ expect(2 ) { reducer(1 , Increment ()) }
11+ }
1612
17- it("should handle DECREMENT action") {
18- expect(reducer(1, Decrement ())).toBe(0)
19- }
13+ @Test
14+ fun shouldHandleDECREMENTAction () {
15+ expect(0 ) { reducer(1 , Decrement ()) }
16+ }
2017
21- it("should ignore unknown actions") {
22- expect(reducer(1, Any ())).toBe(1)
23- }
24- }
18+ @Test
19+ fun shouldIgnoreUnknownActions () {
20+ expect(1 ) { reducer(1 , Any ()) }
2521 }
26- })
22+ }
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ android {
3535 }
3636}
3737
38-
3938dependencies {
4039 implementation(Libs .kotlin_stdlib_jdk8)
4140 implementation(Libs .appcompat)
Original file line number Diff line number Diff line change @@ -3,10 +3,6 @@ plugins {
33 kotlin(" multiplatform" )
44}
55
6- repositories {
7- maven(" https://dl.bintray.com/spekframework/spek-dev" )
8- }
9-
106kotlin {
117 iosArm32()
128 iosArm64()
@@ -29,28 +25,22 @@ kotlin {
2925 sourceSets {
3026 commonMain {
3127 dependencies {
32- implementation(project(" :redux-kotlin-threadsafe " ))
28+ implementation(project(" :redux-kotlin" ))
3329 }
3430 }
3531 commonTest {
36- kotlin.srcDir(" src/test/kotlin" )
3732 dependencies {
3833 implementation(kotlin(" test-common" ))
3934 implementation(kotlin(" test-annotations-common" ))
40- implementation(" org.spekframework.spek2:spek-dsl-metadata:${Versions .org_spekframework_spek2} " )
41- implementation(" ch.tutteli.atrium:atrium-cc-en_GB-robstoll-common:${Versions .ch_tutteli_atrium} " )
4235 implementation(" io.mockk:mockk-common:${Versions .io_mockk} " )
4336 }
4437 }
4538 val jvmTest by getting {
4639 dependencies {
4740 implementation(kotlin(" test" ))
4841 implementation(kotlin(" test-junit" ))
49- implementation(" org.spekframework.spek2:spek-dsl-jvm:${Versions .org_spekframework_spek2} " )
50- implementation(" ch.tutteli.atrium:atrium-cc-en_GB-robstoll:${Versions .ch_tutteli_atrium} " )
5142 implementation(" io.mockk:mockk:${Versions .io_mockk} " )
5243
53- runtimeOnly(" org.spekframework.spek2:spek-runner-junit5:${Versions .org_spekframework_spek2} " )
5444 runtimeOnly(" org.jetbrains.kotlin:kotlin-reflect" )
5545 }
5646 }
@@ -62,11 +52,3 @@ kotlin {
6252 }
6353 }
6454}
65-
66- tasks {
67- val jvmTest by getting(Test ::class ) {
68- useJUnitPlatform {
69- includeEngines(" spek2" )
70- }
71- }
72- }
You can’t perform that action at this time.
0 commit comments