< Summary

Class:SVETA.Api.Data.DTO.DeliveryTypeResponseDto
Assembly:SVETA.Api
File(s):/opt/dev/sveta_api_build/SVETA.Api/Data/DTO/DeliveryTypeDto.cs
Covered lines:1
Uncovered lines:9
Coverable lines:10
Total lines:30
Line coverage:10% (1 of 10)
Covered branches:0
Total branches:10
Branch coverage:0% (0 of 10)

Metrics

MethodLine coverage Branch coverage
.ctor()100%100%
.ctor(...)0%0%
get_DeliveryCostType()0%100%

File(s)

/opt/dev/sveta_api_build/SVETA.Api/Data/DTO/DeliveryTypeDto.cs

#LineLine coverage
 1using System;
 2using System.ComponentModel.DataAnnotations;
 3using System.Collections.Generic;
 4using System.Linq;
 5using System.Threading.Tasks;
 6using WinSolutions.Sveta.Server.Data.DataModel.Entities;
 7using WinSolutions.Sveta.Server.Data.DataModel.Kinds;
 8
 9namespace SVETA.Api.Data.DTO
 10{
 11    public class DeliveryTypeResponseDto : IdNameDTO
 12    {
 37513        public DeliveryTypeResponseDto() { }
 14
 015        public DeliveryTypeResponseDto(DeliveryType data)
 016        {
 017            Id = data.Id;
 018            Name = data.Name;
 019            DeliveryCostType = new List<IdNameDTO>();
 020            if (data.DeliveryCostTypes?.Count > 0)
 021                DeliveryCostType.AddRange(data.DeliveryCostTypes.Where(x => !x.IsDeleted && x.RecStateId == (long)Record
 022        }
 023        public List<IdNameDTO> DeliveryCostType { get; set; }
 24    }
 25
 26    public class DeliveryTypeOrderRequestDTO
 27    {
 28        public long DeliveryTypeId { get; set; }
 29    }
 30}