Adapt Konsist test for Fake Rust classes.

This commit is contained in:
Benoit Marty
2024-09-18 18:50:54 +02:00
parent d9c9741c76
commit 35fcb96e47

View File

@@ -68,11 +68,12 @@ class KonsistClassNameTest {
.withoutName(
"FakeFileSystem",
"FakeImageLoader",
"FakeRustRoom",
)
.assertTrue {
val interfaceName = it.name.replace("Fake", "")
it.name.startsWith("Fake") &&
val interfaceName = it.name
.replace("FakeRust", "")
.replace("Fake", "")
(it.name.startsWith("Fake") || it.name.startsWith("FakeRust")) &&
it.parents().any { parent -> parent.name.replace(".", "") == interfaceName }
}
}