-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Labels
Description
From the Kotlin coding conventions:
Source code organization
Directory Structure
In pure Kotlin projects, the recommended directory structure follows the package structure with the common root package omitted. For example, if all the code in the project is in the
org.example.kotlinpackage and its subpackages, files with theorg.example.kotlinpackage should be placed directly under the source root, and files inorg.example.kotlin.network.socketshould be in thenetwork/socketsubdirectory of the source root.
However, if you do this, you get:
Didn't find org.example.kotlin.network.socket.ExampleTest under C:\work\example
com.spun.util.FormattedException: org.example.kotlin.network.socket.ExampleTest under C:\work\example
at app//com.spun.util.ClassUtils.getSourceDirectory(ClassUtils.java:103)
at app//com.spun.util.ClassUtils.getSourceDirectory(ClassUtils.java:108)
at app//com.spun.util.tests.TestUtils.getInfo(TestUtils.java:214)
at app//com.spun.util.tests.TestUtils.getCurrentFileForMethod(TestUtils.java:201)
at app//com.spun.util.tests.TestUtils.getCurrentFileForMethod(TestUtils.java:193)
at app//org.approvaltests.namer.StackTraceNamer.<init>(StackTraceNamer.java:17)
at app//org.approvaltests.Approvals$1.load(Approvals.java:41)
at app//org.approvaltests.Approvals$1.load(Approvals.java:38)
at app//org.approvaltests.Approvals.createApprovalNamer(Approvals.java:257)
at app//com.spun.util.ArrayUtils.getOrElse(ArrayUtils.java:302)
at app//org.approvaltests.core.Options$FileOptions.getNamer(Options.java:104)
at app//org.approvaltests.Approvals.verify(Approvals.java:183)
at app//org.approvaltests.Approvals.verify(Approvals.java:50)
at app//org.approvaltests.Approvals.verify(Approvals.java:59)
at app//org.approvaltests.combinations.CombinationsHelper.verifyAllCombinations(CombinationsHelper.java:27)
at app//org.approvaltests.combinations.CombinationApprovals.verifyAllCombinations(CombinationApprovals.java:205)
at app//org.approvaltests.combinations.CombinationApprovals.verifyAllCombinations(CombinationApprovals.java:194)
at app//org.approvaltests.combinations.CombinationApprovals.verifyAllCombinations(CombinationApprovals.java:50)