[KPM] IdeaKotlinProjectModelSerializableTest compare by string representation

KT-51262
KT-51220
This commit is contained in:
sebastian.sellmair
2022-02-14 16:30:43 +01:00
committed by Space
parent fdcdd8e247
commit 956337ad87
2 changed files with 7 additions and 3 deletions
@@ -25,6 +25,10 @@ abstract class KotlinExternalModelContainer internal constructor() : Serializabl
override fun <T : Any> contains(key: KotlinExternalModelKey<T>): Boolean = false
override fun <T : Any> get(key: KotlinExternalModelKey<T>): T? = null
}
override fun toString(): String {
return "KotlinExternalModelContainer(${ids.joinToString("; ", "[", "]")}"
}
}
abstract class KotlinMutableExternalModelContainer internal constructor() : KotlinExternalModelContainer() {
@@ -21,7 +21,7 @@ import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.fail
class KotlinIdeaProjectModelSerializableTest : AbstractKpmExtensionTest() {
class IdeaKotlinProjectModelSerializableTest : AbstractKpmExtensionTest() {
@Test
fun `test - serialize and deserialize - empty project`() {
@@ -61,8 +61,8 @@ class KotlinIdeaProjectModelSerializableTest : AbstractKpmExtensionTest() {
}
assertEquals(
model, deserializedModel,
"Expected deserializedModel to match source model"
model.toString(), deserializedModel.toString(),
"Expected deserializedModel string representation to match source model"
)
}
}