StakeAddressMapperImpl.java

1
package org.cardanofoundation.explorer.api.mapper;
2
3
import javax.annotation.processing.Generated;
4
import org.cardanofoundation.explorer.api.model.response.stake.StakeFilterResponse;
5
import org.cardanofoundation.explorer.api.projection.StakeAddressProjection;
6
import org.cardanofoundation.explorer.api.projection.StakeDelegationProjection;
7
import org.springframework.stereotype.Component;
8
9
@Generated(
10
    value = "org.mapstruct.ap.MappingProcessor",
11
    date = "2024-11-05T06:00:28+0000",
12
    comments = "version: 1.5.3.Final, compiler: javac, environment: Java 18.0.2.1 (Eclipse Adoptium)"
13
)
14
@Component
15
public class StakeAddressMapperImpl implements StakeAddressMapper {
16
17
    @Override
18
    public StakeFilterResponse fromStakeAddressAndDelegationProjection(StakeAddressProjection stake, StakeDelegationProjection delegation) {
19 2 1. fromStakeAddressAndDelegationProjection : negated conditional → NO_COVERAGE
2. fromStakeAddressAndDelegationProjection : negated conditional → NO_COVERAGE
        if ( stake == null && delegation == null ) {
20
            return null;
21
        }
22
23
        StakeFilterResponse.StakeFilterResponseBuilder stakeFilterResponse = StakeFilterResponse.builder();
24
25 1 1. fromStakeAddressAndDelegationProjection : negated conditional → NO_COVERAGE
        if ( stake != null ) {
26
            stakeFilterResponse.stakeKey( stake.getStakeAddress() );
27
            stakeFilterResponse.balance( stake.getTotalStake() );
28
        }
29 1 1. fromStakeAddressAndDelegationProjection : negated conditional → NO_COVERAGE
        if ( delegation != null ) {
30
            stakeFilterResponse.poolId( delegation.getPoolId() );
31
            stakeFilterResponse.tickerName( delegation.getTickerName() );
32
            stakeFilterResponse.poolName( delegation.getPoolName() );
33
        }
34
35 1 1. fromStakeAddressAndDelegationProjection : replaced return value with null for org/cardanofoundation/explorer/api/mapper/StakeAddressMapperImpl::fromStakeAddressAndDelegationProjection → NO_COVERAGE
        return stakeFilterResponse.build();
36
    }
37
}

Mutations

19

1.1
Location : fromStakeAddressAndDelegationProjection
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : fromStakeAddressAndDelegationProjection
Killed by : none
negated conditional → NO_COVERAGE

25

1.1
Location : fromStakeAddressAndDelegationProjection
Killed by : none
negated conditional → NO_COVERAGE

29

1.1
Location : fromStakeAddressAndDelegationProjection
Killed by : none
negated conditional → NO_COVERAGE

35

1.1
Location : fromStakeAddressAndDelegationProjection
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/mapper/StakeAddressMapperImpl::fromStakeAddressAndDelegationProjection → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.14.2