< Summary

Class:SVETA.Api.Data.DTO.DepartmentDTO.DepartmentShortWithAddressDTO
Assembly:SVETA.Api
File(s):/opt/dev/sveta_api_build/SVETA.Api/Data/DTO/DepartmentDTO/DepartmentShortDTO.cs
Covered lines:4
Uncovered lines:8
Coverable lines:12
Total lines:42
Line coverage:33.3% (4 of 12)
Covered branches:0
Total branches:0

Metrics

MethodLine coverage Branch coverage
.ctor()100%100%
.ctor(...)0%100%
get_Id()100%100%
get_Name()0%100%
get_Address()0%100%

File(s)

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

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4using System.Threading.Tasks;
 5using WinSolutions.Sveta.Server.Data.DataModel.Entities;
 6
 7namespace SVETA.Api.Data.DTO.DepartmentDTO
 8{
 9    public class DepartmentShortDTO
 10    {
 11        public DepartmentShortDTO()
 12        {
 13
 14        }
 15        public DepartmentShortDTO(Department data)
 16        {
 17            Id = data.Id;
 18            Name = data.Name;
 19            ContragentId = data.Contragent.Id;
 20        }
 21        public long Id { get; set; }
 22        public string Name { get; set; }
 23        public long ContragentId { get; set; }
 24    }
 25
 26    public class DepartmentShortWithAddressDTO
 27    {
 25028        public DepartmentShortWithAddressDTO()
 25029        {
 30
 25031        }
 032        public DepartmentShortWithAddressDTO(Department data)
 033        {
 034            Id = data.Id;
 035            Name = data.Name;
 036            Address = data.ActualAddress.FullAddress;
 037        }
 25338        public long Id { get; set; }
 039        public string Name { get; set; }
 040        public string Address { get; set; }
 41    }
 42}