< Summary

Class:SVETA.Api.Data.DTO.DepartmentDTO.GoodSettingResponseDTO
Assembly:SVETA.Api
File(s):/opt/dev/sveta_api_build/SVETA.Api/Data/DTO/DepartmentDTO/GoodSettingResponseDTO.cs
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:52
Line coverage:0% (0 of 26)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodLine coverage Branch coverage
.ctor()0%100%
.ctor(...)0%0%
get_Id()0%100%
get_GoodId()0%100%
get_Name()0%100%
get_VendorCode()0%100%
get_MinQuantity()0%100%
get_PickingQuantum()0%100%
get_Photo()0%100%
get_UniqueCode()0%100%
get_Labels()0%100%
get_ShowcaseVisible()0%100%

File(s)

/opt/dev/sveta_api_build/SVETA.Api/Data/DTO/DepartmentDTO/GoodSettingResponseDTO.cs

#LineLine coverage
 1using DocumentFormat.OpenXml.Vml.Spreadsheet;
 2using System;
 3using System.Collections.Generic;
 4using System.Linq;
 5using System.Threading.Tasks;
 6using WinSolutions.Sveta.Server.Data.DataModel.Entities;
 7using WinSolutions.Sveta.Server.Data.DataModel.Extensions;
 8
 9namespace SVETA.Api.Data.DTO.DepartmentDTO
 10{
 11    public class GoodSettingResponseDTO
 12    {
 013        public GoodSettingResponseDTO() { }
 014        public GoodSettingResponseDTO(DepartmentGoodSetting data)
 015        {
 016            Id = data.Id;
 017            GoodId = data.Good.Id;
 018            Name = data.Good.Name;
 019            VendorCode = data.GetActualVendorCode();
 020            MinQuantity = data.MinQuantity;
 021            PickingQuantum = data.PickingQuantum;
 022            Photo = (PhotoPrevDto) data.Good.Photos.FirstOrDefault();
 023            UniqueCode = data.Good.UniqueCode;
 024            Labels = new List<GoodLabelResponseDTO>();
 025            if (data.GoodSettingsLabels?.Count > 0)
 026                Labels.AddRange(data.GoodSettingsLabels.Select(x => new GoodLabelResponseDTO(x.GoodLabel)));
 027            ShowcaseVisible = data.ShowcaseVisible;
 028        }
 029        public long Id { get; set; }
 030        public long GoodId { get; set; }
 031        public string Name { get; set; }
 032        public string VendorCode { get; set; }
 033        public decimal MinQuantity { get; set; }
 034        public decimal PickingQuantum { get; set; }
 035        public PhotoPrevDto Photo { get; set; }
 036        public string UniqueCode { get; set; }
 037        public List<GoodLabelResponseDTO> Labels { get; set; }
 038        public bool ShowcaseVisible { get; set; }
 39    }
 40
 41    public class GoodSettingsSourceGoodsResponseDTO
 42    {
 43        public long Id { get; set; }
 44        public string VendorCode { get; set; }
 45        public string Name { get; set; }
 46        public bool IsInSetting { get; set; }
 47        public long? SettingId { get; set; }
 48        public PhotoPrevDto Photo { get; set; }
 49
 50        public string UniqueCode { get; set; }
 51    }
 52}