use of io.seata.core.protocol.transaction.GlobalCommitRequest in project seata by seata.
the class GlobalCommitRequestConvertorTest method convert2Proto.
@Test
public void convert2Proto() {
GlobalCommitRequest globalCommitRequest = new GlobalCommitRequest();
globalCommitRequest.setExtraData("extraData");
globalCommitRequest.setXid("xid");
GlobalCommitRequestConvertor convertor = new GlobalCommitRequestConvertor();
GlobalCommitRequestProto proto = convertor.convert2Proto(globalCommitRequest);
GlobalCommitRequest real = convertor.convert2Model(proto);
assertThat((real.getTypeCode())).isEqualTo(globalCommitRequest.getTypeCode());
assertThat((real.getXid())).isEqualTo(globalCommitRequest.getXid());
assertThat((real.getExtraData())).isEqualTo(globalCommitRequest.getExtraData());
}
Aggregations