Michał Doliński
05/06/2025, 8:55 PMkqr
05/07/2025, 7:29 AMkqr
05/07/2025, 7:30 AMigor.wojda
05/08/2025, 6:19 AMMichał Doliński
05/08/2025, 1:51 PMigor.wojda
05/08/2025, 2:18 PMtext
property to get string representing class. Not the most optimal way, but it will work:
Konsist
.scopeFromProject()
.classes()
.withName("Foo") // pick your class
.assertTrue {
!it.text.contains(".methodName()")
}
You can also check imports of class:
Konsist
.scopeFromProject()
.classes()
.withName("Foo")
.assertTrue {
it.containingFile.hasImportWithName("com.lemonappdev.test")
}