Fix API break in Fake classes must be named using Fake and the interface it fakes
It seems that the workaround is not necessary anymore.
This commit is contained in:
@@ -91,11 +91,7 @@ class KonsistClassNameTest {
|
||||
.replace("Fake", "")
|
||||
val result = (it.name.startsWith("Fake") || it.name.startsWith("FakeRust")) &&
|
||||
it.parents().any { parent ->
|
||||
// Workaround to get the parent name. For instance:
|
||||
// parent.name used to return `UserListPresenter.Factory` but is now returning `Factory`.
|
||||
// So we need to retrieve the name of the parent class differently.
|
||||
val packageName = parent.packagee!!.name
|
||||
val parentName = parent.fullyQualifiedName!!.substringAfter("$packageName.").replace(".", "")
|
||||
val parentName = parent.name.replace(".", "")
|
||||
parentName == interfaceName
|
||||
}
|
||||
if (!result && it.name in failingCasesList) {
|
||||
|
||||
Reference in New Issue
Block a user