mirror of
https://github.com/corda/corda.git
synced 2025-03-13 07:54:32 +00:00
Add a broken serializer for EdDSAPublicKey to make test more robust
This commit is contained in:
parent
cf2928b7bd
commit
862a590d32
@ -7,6 +7,7 @@ import net.corda.core.flows.StartableByRPC
|
||||
import net.corda.core.serialization.CheckpointCustomSerializer
|
||||
import net.corda.testing.node.internal.CustomCordapp
|
||||
import net.corda.testing.node.internal.enclosedCordapp
|
||||
import net.i2p.crypto.eddsa.EdDSAPublicKey
|
||||
import org.assertj.core.api.Assertions
|
||||
import java.security.PublicKey
|
||||
import java.time.Duration
|
||||
@ -197,4 +198,17 @@ class TestCorDapp {
|
||||
throw FlowException("Broken on purpose")
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
class BrokenEdDSAPublicKeySerializer :
|
||||
CheckpointCustomSerializer<EdDSAPublicKey, String> {
|
||||
override fun toProxy(obj: EdDSAPublicKey): String {
|
||||
throw FlowException("Broken on purpose")
|
||||
}
|
||||
|
||||
override fun fromProxy(proxy: String): EdDSAPublicKey {
|
||||
throw FlowException("Broken on purpose")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user