Karl Azzam
04/15/2024, 7:06 PM@Test
fun `hexagonal layers are in correct packages`() {
Konsist
.scopeFromProject() // Define the scope containing all Kotlin files present in project
.assertArchitecture { // Assert architecture
// Define layers
val domain = Layer("Domain", "com.foo.domain..")
val inputAdapter = Layer("InputAdapter", "com.foo.framework.input..")
// Define architecture assertions
domain.dependsOnNothing()
// the below line fails due to tests in being dependent on the inputAdapter layer
inputAdapter.dependsOnNothing()
}
}