< Summary

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

Metrics

MethodLine coverage Branch coverage
get_Id()0%100%
get_VendorCode()0%100%
get_Name()0%100%
get_IsInRest()0%100%
get_RestId()0%100%
get_Photo()0%100%
get_UniqueCode()0%100%

File(s)

/opt/dev/sveta_api_build/SVETA.Api/Data/DTO/Rest/RestResponseDTO.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4using System.Threading.Tasks;
 5using WinSolutions.Sveta.Server.Data.DataModel.Entities;
 6using WinSolutions.Sveta.Server.Data.DataModel.Extensions;
 7
 8namespace SVETA.Api.Data.DTO.Rest
 9{
 10    public class RestResponseDTO
 11    {
 12        public RestResponseDTO() { }
 13        public RestResponseDTO(WinSolutions.Sveta.Server.Data.DataModel.Entities.Rest data)
 14        {
 15            Id = data.Id;
 16            GoodId = data.Good.Id;
 17            Name = data.Good.Name;
 18            VendorCode = data.Good.GetActualVendorCode(data.DepartmentId);
 19            Quantity = data.Quantity;
 20            Photo = (PhotoPrevDto) data.Good.Photos.FirstOrDefault();
 21            UniqueCode = data.Good.UniqueCode;
 22            BarCode = data.Good.GetActualBarCode();
 23        }
 24        public long Id { get; set; }
 25        public long GoodId { get; set; }
 26        public string Name { get; set; }
 27        public string VendorCode { get; set; }
 28        public decimal Quantity { get; set; }
 29        public PhotoPrevDto Photo { get; set; }
 30        public string UniqueCode { get; set; }
 31        public string BarCode { get; set; }
 32    }
 33
 34    public class RestSourceGoodsResponseDTO
 35    {
 036        public long Id { get; set; }
 037        public string VendorCode { get; set; }
 038        public string Name { get; set; }
 039        public bool IsInRest { get; set; }
 040        public long? RestId { get; set; }
 041        public PhotoPrevDto Photo { get; set; }
 42
 043        public string UniqueCode { get; set; }
 44    }
 45}