mirror of
https://github.com/corda/corda.git
synced 2025-03-13 07:54:32 +00:00
Rename class to have a shorter name
This commit is contained in:
parent
ae6104ad37
commit
1ebfccadd0
@ -13,7 +13,7 @@ class MockNetworkCustomCheckpointSerializerTest {
|
|||||||
|
|
||||||
@Before
|
@Before
|
||||||
fun setup() {
|
fun setup() {
|
||||||
mockNetwork = MockNetwork(MockNetworkParameters(cordappsForAllNodes = listOf(CustomCheckpointSerializerCorDapp.getCorDapp())))
|
mockNetwork = MockNetwork(MockNetworkParameters(cordappsForAllNodes = listOf(TestCorDapp.getCorDapp())))
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
@ -25,7 +25,7 @@ class MockNetworkCustomCheckpointSerializerTest {
|
|||||||
fun `flow suspend with custom kryo serializer`() {
|
fun `flow suspend with custom kryo serializer`() {
|
||||||
val node = mockNetwork.createPartyNode()
|
val node = mockNetwork.createPartyNode()
|
||||||
val expected = 5
|
val expected = 5
|
||||||
val actual = node.startFlow(CustomCheckpointSerializerCorDapp.TestFlowWithDifficultToSerializeLocalVariable(5)).get()
|
val actual = node.startFlow(TestCorDapp.TestFlowWithDifficultToSerializeLocalVariable(5)).get()
|
||||||
|
|
||||||
Assertions.assertThat(actual).isEqualTo(expected)
|
Assertions.assertThat(actual).isEqualTo(expected)
|
||||||
}
|
}
|
||||||
@ -35,7 +35,7 @@ class MockNetworkCustomCheckpointSerializerTest {
|
|||||||
val node = mockNetwork.createPartyNode()
|
val node = mockNetwork.createPartyNode()
|
||||||
val expectedReference = DifficultToSerialize.BrokenMapClass<String, Int>()
|
val expectedReference = DifficultToSerialize.BrokenMapClass<String, Int>()
|
||||||
expectedReference.putAll(mapOf("one" to 1))
|
expectedReference.putAll(mapOf("one" to 1))
|
||||||
val actualReference = node.startFlow(CustomCheckpointSerializerCorDapp.TestFlowCheckingReferencesWork(expectedReference)).get()
|
val actualReference = node.startFlow(TestCorDapp.TestFlowCheckingReferencesWork(expectedReference)).get()
|
||||||
|
|
||||||
Assertions.assertThat(actualReference).isSameAs(expectedReference)
|
Assertions.assertThat(actualReference).isSameAs(expectedReference)
|
||||||
Assertions.assertThat(actualReference["one"]).isEqualTo(1)
|
Assertions.assertThat(actualReference["one"]).isEqualTo(1)
|
||||||
@ -45,7 +45,7 @@ class MockNetworkCustomCheckpointSerializerTest {
|
|||||||
@Suspendable
|
@Suspendable
|
||||||
fun `check serilization of interfaces`() {
|
fun `check serilization of interfaces`() {
|
||||||
val node = mockNetwork.createPartyNode()
|
val node = mockNetwork.createPartyNode()
|
||||||
val result = node.startFlow(CustomCheckpointSerializerCorDapp.TestFlowWithDifficultToSerializeLocalVariableAsInterface(5)).get()
|
val result = node.startFlow(TestCorDapp.TestFlowWithDifficultToSerializeLocalVariableAsInterface(5)).get()
|
||||||
Assertions.assertThat(result).isEqualTo(5)
|
Assertions.assertThat(result).isEqualTo(5)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ class MockNetworkCustomCheckpointSerializerTest {
|
|||||||
@Suspendable
|
@Suspendable
|
||||||
fun `check serilization of abstract classes`() {
|
fun `check serilization of abstract classes`() {
|
||||||
val node = mockNetwork.createPartyNode()
|
val node = mockNetwork.createPartyNode()
|
||||||
val result = node.startFlow(CustomCheckpointSerializerCorDapp.TestFlowWithDifficultToSerializeLocalVariableAsAbstract(5)).get()
|
val result = node.startFlow(TestCorDapp.TestFlowWithDifficultToSerializeLocalVariableAsAbstract(5)).get()
|
||||||
Assertions.assertThat(result).isEqualTo(5)
|
Assertions.assertThat(result).isEqualTo(5)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,10 @@ import net.corda.testing.node.internal.enclosedCordapp
|
|||||||
import org.assertj.core.api.Assertions
|
import org.assertj.core.api.Assertions
|
||||||
import java.time.Duration
|
import java.time.Duration
|
||||||
|
|
||||||
class CustomCheckpointSerializerCorDapp {
|
/**
|
||||||
|
* Contains all the flows and custom serializers for testing custom checkpoint serializers
|
||||||
|
*/
|
||||||
|
class TestCorDapp {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun getCorDapp(): CustomCordapp = enclosedCordapp()
|
fun getCorDapp(): CustomCordapp = enclosedCordapp()
|
Loading…
x
Reference in New Issue
Block a user