TxReferenceInputMapper.java

1
package org.cardanofoundation.explorer.api.mapper;
2
3
import com.bloxbean.cardano.client.util.HexUtil;
4
import org.mapstruct.Mapper;
5
import org.mapstruct.Mapping;
6
import org.mapstruct.Named;
7
8
import org.cardanofoundation.explorer.api.model.response.tx.TxReferenceInput;
9
import org.cardanofoundation.explorer.api.projection.ReferenceInputProjection;
10
11
@Mapper(componentModel = "spring")
12
public interface TxReferenceInputMapper {
13
14
  @Mapping(target = "datum", source = "datumBytes", qualifiedByName = "bytesToString")
15
  @Mapping(target = "script", source = "scriptBytes", qualifiedByName = "bytesToString")
16
  TxReferenceInput fromReferenceInputProjectionTxReferenceInput(
17
      ReferenceInputProjection projection);
18
19
  @Named("bytesToString")
20
  default String bytesToString(byte[] bytes) {
21 1 1. bytesToString : replaced return value with "" for org/cardanofoundation/explorer/api/mapper/TxReferenceInputMapper::bytesToString → NO_COVERAGE
    return HexUtil.encodeHexString(bytes);
22
  }
23
}

Mutations

21

1.1
Location : bytesToString
Killed by : none
replaced return value with "" for org/cardanofoundation/explorer/api/mapper/TxReferenceInputMapper::bytesToString → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.14.2