< Summary

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

Metrics

MethodLine coverage Branch coverage
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 = "Название ярлыка не может быть пустым")]
 015        public string Name { get; set; }
 16        [DigitValidate (CanBeZero = false)]
 17        [Display(Name = "Приоритет ярлыка")]
 018        public int Priority { get; set; }
 19        [StringLength(maximumLength: 7, ErrorMessage = "Цвет ярлыка должен состоять из решетки и 6 символов")]
 020        public string LabelColor { get; set; }
 21        [StringLength(maximumLength: 7, ErrorMessage = "Цвет текста должен состоять из решетки и 6 символов")]
 022        public string TextColor { get; set; }
 023        public bool ShowcaseVisible { get; set; }
 24    }
 25
 26    public class GoodLabelResponseDTO
 27    {
 28        public GoodLabelResponseDTO() { }
 29        public GoodLabelResponseDTO(GoodLabel data)
 30        {
 31            Id = data.Id;
 32            Name = data.Name;
 33            Priority = data.Priority;
 34            LabelColor = data.LabelColor;
 35            TextColor = data.TextColor;
 36            ShowcaseVisible = data.ShowcaseVisible;
 37        }
 38        public long Id { get; set; }
 39        public string Name { get; set; }
 40        public int Priority { get; set; }
 41        public string LabelColor { get; set; }
 42        public string TextColor { get; set; }
 43        public bool ShowcaseVisible { get; set; }
 44    }
 45}