Last active
August 19, 2024 16:09
-
-
Save gerin98/b60333ced7272997fb6785635f30cfa4 to your computer and use it in GitHub Desktop.
[Blogpost] Creating a helper class to filter unit tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FilterUnitTests { | |
fun getResult(project: Project): List<String> { | |
val fileComponent = FilesChangedComponent(project) | |
val modulesComponent = ModulesChangedComponent(project) | |
val filesChanged = fileComponent.diff() | |
val modulesChanged = modulesComponent.affectedModules(filesChanged) | |
return modulesChanged.map { | |
val moduleName = it.split("/").last() | |
"com.wf.$moduleName.*" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment