Add test-only IXplatAbstractions implementation for running common tests
object-Object opened this issue ยท 1 comments
Describe the feature
Attempting to, for example, initialize DoubleIota in a unit test depending on hexcasting-common results in the following error:
java.lang.ExceptionInInitializerError
at at.petrak.hexcasting.common.lib.hex.HexIotaTypes.<clinit>(HexIotaTypes.java:21)
at at.petrak.hexcasting.api.casting.iota.DoubleIota.<init>(DoubleIota.java:17)
at ram.talia.hexal.api.everbook.FileEncrypterDecrypterTest.testEncryptDecryptEverbook(FileEncrypterDecrypterTest.kt:54)
...
Caused by: java.lang.IllegalStateException: There should be exactly one IXplatAbstractions implementation on the classpath. Found: []
at at.petrak.hexcasting.xplat.IXplatAbstractions.find(IXplatAbstractions.java:201)
at at.petrak.hexcasting.xplat.IXplatAbstractions.<clinit>(IXplatAbstractions.java:195)
... 87 more
Addons could make their own stubbed IXplatAbstractions implementations to work around this, but it would be convenient for us to provide one.
Additional context
No response
For addon developers looking to do this themselves, here's an example: object-Object/Hexal@90b5fbc