VotingProcedureMapperImpl.java

1
package org.cardanofoundation.explorer.api.mapper;
2
3
import javax.annotation.processing.Generated;
4
import org.cardanofoundation.explorer.api.model.response.governanceAction.HistoryVote;
5
import org.cardanofoundation.explorer.api.projection.VotingProcedureProjection;
6
import org.springframework.stereotype.Component;
7
8
@Generated(
9
    value = "org.mapstruct.ap.MappingProcessor",
10
    date = "2024-11-05T06:00:27+0000",
11
    comments = "version: 1.5.3.Final, compiler: javac, environment: Java 18.0.2.1 (Eclipse Adoptium)"
12
)
13
@Component
14
public class VotingProcedureMapperImpl implements VotingProcedureMapper {
15
16
    @Override
17
    public HistoryVote fromVotingProcedureProjection(VotingProcedureProjection votingProcedureProjection) {
18 1 1. fromVotingProcedureProjection : negated conditional → KILLED
        if ( votingProcedureProjection == null ) {
19
            return null;
20
        }
21
22
        HistoryVote.HistoryVoteBuilder<?, ?> historyVote = HistoryVote.builder();
23
24
        historyVote.txHash( votingProcedureProjection.getVotingProcedureTxHash() );
25 1 1. fromVotingProcedureProjection : negated conditional → SURVIVED
        if ( votingProcedureProjection.getVotingProcedureTxIndex() != null ) {
26
            historyVote.txIndex( String.valueOf( votingProcedureProjection.getVotingProcedureTxIndex() ) );
27
        }
28
        historyVote.vote( votingProcedureProjection.getVote() );
29
30
        historyVote.timestamp( fromLong(votingProcedureProjection.getBlockTime()) );
31
32 1 1. fromVotingProcedureProjection : replaced return value with null for org/cardanofoundation/explorer/api/mapper/VotingProcedureMapperImpl::fromVotingProcedureProjection → SURVIVED
        return historyVote.build();
33
    }
34
}

Mutations

18

1.1
Location : fromVotingProcedureProjection
Killed by : org.cardanofoundation.explorer.api.service.GovActionServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.GovActionServiceTest]/[method:getGovActionDetails()]
negated conditional → KILLED

25

1.1
Location : fromVotingProcedureProjection
Killed by : none
negated conditional → SURVIVED

32

1.1
Location : fromVotingProcedureProjection
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/mapper/VotingProcedureMapperImpl::fromVotingProcedureProjection → SURVIVED

Active mutators

Tests examined


Report generated by PIT 1.14.2