< Summary

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

Metrics

MethodLine coverage Branch coverage
.ctor()0%100%
.ctor(...)0%100%
get_Id()0%100%
get_GoodId()0%100%
get_Name()0%100%
get_VendorCode()0%100%
get_Quantity()0%100%
get_Photo()0%100%
get_UniqueCode()0%100%
get_BarCode()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    {
 012        public RestResponseDTO() { }
 013        public RestResponseDTO(WinSolutions.Sveta.Server.Data.DataModel.Entities.Rest data)
 014        {
 015            Id = data.Id;
 016            GoodId = data.Good.Id;
 017            Name = data.Good.Name;
 018            VendorCode = data.Good.GetActualVendorCode(data.DepartmentId);
 019            Quantity = data.Quantity;
 020            Photo = (PhotoPrevDto) data.Good.Photos.FirstOrDefault();
 021            UniqueCode = data.Good.UniqueCode;
 022            BarCode = data.Good.GetActualBarCode();
 023        }
 024        public long Id { get; set; }
 025        public long GoodId { get; set; }
 026        public string Name { get; set; }
 027        public string VendorCode { get; set; }
 028        public decimal Quantity { get; set; }
 029        public PhotoPrevDto Photo { get; set; }
 030        public string UniqueCode { get; set; }
 031        public string BarCode { get; set; }
 32    }
 33
 34    public class RestSourceGoodsResponseDTO
 35    {
 36        public long Id { get; set; }
 37        public string VendorCode { get; set; }
 38        public string Name { get; set; }
 39        public bool IsInRest { get; set; }
 40        public long? RestId { get; set; }
 41        public PhotoPrevDto Photo { get; set; }
 42
 43        public string UniqueCode { get; set; }
 44    }
 45}