Search in sources :

Example 1 with HeartbeatMessageProto

use of io.seata.serializer.protobuf.generated.HeartbeatMessageProto in project seata by seata.

the class HeartbeatMessageConvertorTest method test.

@Test
public void test() {
    HeartbeatMessage heartbeatMessage = HeartbeatMessage.PING;
    HeartbeatMessageConvertor convertor = new HeartbeatMessageConvertor();
    HeartbeatMessageProto proto = convertor.convert2Proto(heartbeatMessage);
    HeartbeatMessage real = convertor.convert2Model(proto);
    assertThat(real).isEqualTo(heartbeatMessage);
}
Also used : HeartbeatMessageProto(io.seata.serializer.protobuf.generated.HeartbeatMessageProto) HeartbeatMessage(io.seata.core.protocol.HeartbeatMessage) Test(org.junit.jupiter.api.Test)

Aggregations

HeartbeatMessage (io.seata.core.protocol.HeartbeatMessage)1 HeartbeatMessageProto (io.seata.serializer.protobuf.generated.HeartbeatMessageProto)1 Test (org.junit.jupiter.api.Test)1