< Summary

Information
Class: MRA.DTO.Mapper.CollectionMapper
Assembly: MRA.DTO
File(s): D:\a\MiguelRomerART\MiguelRomerART\MRA.DTO\Mapper\CollectionMapper.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 16
Coverable lines: 16
Total lines: 33
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ConvertToModel(...)100%210%
ConvertToDocument(...)100%210%

File(s)

D:\a\MiguelRomerART\MiguelRomerART\MRA.DTO\Mapper\CollectionMapper.cs

#LineLine coverage
 1using MRA.DTO.Mapper.Interfaces;
 2using MRA.DTO.Models;
 3using MRA.Infrastructure.Database.Documents.Interfaces;
 4using MRA.Infrastructure.Database.Documents.MongoDb;
 5
 6namespace MRA.DTO.Mapper;
 7
 8public class CollectionMapper : IDocumentMapper<CollectionModel, ICollectionDocument>
 9{
 10    public CollectionModel ConvertToModel(ICollectionDocument collectionDocument)
 11    {
 012        return new CollectionModel
 013        {
 014            Id = collectionDocument.Id,
 015            Name = collectionDocument.name,
 016            Description = collectionDocument.description,
 017            Order = collectionDocument.order,
 018            DrawingIds = collectionDocument.drawingIds
 019        };
 20    }
 21
 22    public ICollectionDocument ConvertToDocument(CollectionModel collection)
 23    {
 024        return new CollectionMongoDocument
 025        {
 026            Id = collection.Id,
 027            name = collection.Name,
 028            description = collection.Description,
 029            order = collection.Order,
 030            drawingIds = collection.DrawingIds
 031        };
 32    }
 33}