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( .withoutName(
"FakeFileSystem", "FakeFileSystem",
"FakeImageLoader", "FakeImageLoader",
"FakeRustRoom",
) )
.assertTrue { .assertTrue {
val interfaceName = it.name.replace("Fake", "") val interfaceName = it.name
it.name.startsWith("Fake") && .replace("FakeRust", "")
.replace("Fake", "")
(it.name.startsWith("Fake") || it.name.startsWith("FakeRust")) &&
it.parents().any { parent -> parent.name.replace(".", "") == interfaceName } it.parents().any { parent -> parent.name.replace(".", "") == interfaceName }
} }
} }