< Summary

Class:SVETA.Api.Data.DTO.GoodLabelResponseDTO
Assembly:SVETA.Api
File(s):/opt/dev/sveta_api_build/SVETA.Api/Data/DTO/GoodLabelDTO.cs
Covered lines:0
Uncovered lines:16
Coverable lines:16
Total lines:45
Line coverage:0% (0 of 16)
Covered branches:0
Total branches:0

Metrics

MethodLine coverage Branch coverage
.ctor()0%100%
.ctor(...)0%100%
get_Id()0%100%
get_Name()0%100%
get_Priority()0%100%
get_LabelColor()0%100%
get_TextColor()0%100%
get_ShowcaseVisible()0%100%

File(s)

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

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4using System.Threading.Tasks;
 5using System.ComponentModel.DataAnnotations;
 6using System.Runtime.Serialization;
 7using WinSolutions.Sveta.Server.Data.DataModel.Entities;
 8using SVETA.Api.Validation;
 9
 10namespace SVETA.Api.Data.DTO
 11{
 12    public class GoodLabelRequestDTO
 13    {
 14        [Required(ErrorMessage = "Название ярлыка не может быть пустым")]
 15        public string Name { get; set; }
 16        [DigitValidate (CanBeZero = false)]
 17        [Display(Name = "Приоритет ярлыка")]
 18        public int Priority { get; set; }
 19        [StringLength(maximumLength: 7, ErrorMessage = "Цвет ярлыка должен состоять из решетки и 6 символов")]
 20        public string LabelColor { get; set; }
 21        [StringLength(maximumLength: 7, ErrorMessage = "Цвет текста должен состоять из решетки и 6 символов")]
 22        public string TextColor { get; set; }
 23        public bool ShowcaseVisible { get; set; }
 24    }
 25
 26    public class GoodLabelResponseDTO
 27    {
 028        public GoodLabelResponseDTO() { }
 029        public GoodLabelResponseDTO(GoodLabel data)
 030        {
 031            Id = data.Id;
 032            Name = data.Name;
 033            Priority = data.Priority;
 034            LabelColor = data.LabelColor;
 035            TextColor = data.TextColor;
 036            ShowcaseVisible = data.ShowcaseVisible;
 037        }
 038        public long Id { get; set; }
 039        public string Name { get; set; }
 040        public int Priority { get; set; }
 041        public string LabelColor { get; set; }
 042        public string TextColor { get; set; }
 043        public bool ShowcaseVisible { get; set; }
 44    }
 45}