< Summary

Information
Class: EF.Blockchain.Server.Mappers.WalletMapper
Assembly: EF.Blockchain.Server
File(s): C:\dev\@web3\web3-001-ef-blockchain\backend\EF.Blockchain\src\EF.Blockchain.Server\Mappers\WalletMapper.cs
Line coverage
100%
Covered lines: 11
Uncovered lines: 0
Coverable lines: 11
Total lines: 21
Line coverage: 100%
Branch coverage
50%
Covered branches: 2
Total branches: 4
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ToDto(...)50%44100%

File(s)

C:\dev\@web3\web3-001-ef-blockchain\backend\EF.Blockchain\src\EF.Blockchain.Server\Mappers\WalletMapper.cs

#LineLine coverage
 1using EF.Blockchain.Domain;
 2using EF.Blockchain.Server.Dtos;
 3
 4namespace EF.Blockchain.Server.Mappers;
 5
 6public static class WalletMapper
 7{
 8    public static WalletDto ToDto(int balance, int fee, List<TransactionOutput> utxo)
 89    {
 810        var utxoList = utxo?
 811            .Select(TransactionOutputMapper.ToDto)
 812            .ToList() ?? new List<TransactionOutputDto>();
 13
 814        return new WalletDto
 815        {
 816            Balance = balance,
 817            Fee = fee,
 818            Utxo = utxoList
 819        };
 820    }
 21}