Skip to content

Commit 996f732

Browse files
committed
Fixed compilation error, also added the test task for the new profile
1 parent 931fbab commit 996f732

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

kotlin-libraries-2/src/test/kotlin/com/baeldung/kotlin/immutable/KotlinxImmutablesUnitTest.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ package com.baeldung.kotlin.immutable
33
import org.junit.Assert.assertEquals
44
import kotlinx.collections.immutable.ImmutableList
55
import kotlinx.collections.immutable.immutableListOf
6+
import kotlinx.collections.immutable.persistentListOf
67
import org.junit.Test
78

89
class KotlinxImmutablesUnitTest{
910

1011
@Test
1112
fun givenKICLList_whenAddTried_checkExceptionThrown(){
1213

13-
val list: ImmutableList<String> = immutableListOf("I", "am", "immutable")
14+
val list: ImmutableList<String> = persistentListOf("I", "am", "immutable")
1415

15-
list.add("My new item")
16+
//todo: This is not avalid anymore with latest version of kotlinx.immutableList
17+
//list.add("My new item")
1618

1719
assertEquals(listOf("I", "am", "immutable"), list)
1820
}

pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@
599599
</profile>
600600

601601
<profile>
602-
<id>run-gradle-modules</id>
602+
<id>gradle-modules</id>
603603
<build>
604604
<plugins>
605605
<plugin>
@@ -608,27 +608,27 @@
608608
<executions>
609609
<execution>
610610
<id>build-gradle-kotlin-dsl</id>
611-
<phase>none</phase>
611+
<phase>test</phase>
612612
</execution>
613613
<execution>
614614
<id>test-gradle-kotlin-dsl</id>
615-
<phase>none</phase>
615+
<phase>test</phase>
616616
</execution>
617617
<execution>
618618
<id>build-kotlin-build-plugins</id>
619-
<phase>none</phase>
619+
<phase>test</phase>
620620
</execution>
621621
<execution>
622622
<id>test-kotlin-build-plugins</id>
623-
<phase>none</phase>
623+
<phase>test</phase>
624624
</execution>
625625
<execution>
626626
<id>build-kotlin-kover</id>
627-
<phase>none</phase>
627+
<phase>test</phase>
628628
</execution>
629629
<execution>
630630
<id>test-kotlin-kover</id>
631-
<phase>none</phase>
631+
<phase>test</phase>
632632
</execution>
633633
</executions>
634634
</plugin>

0 commit comments

Comments
 (0)