< Summary

Class:SVETA.Api.Data.DTO.PhotoDTO
Assembly:SVETA.Api
File(s):/opt/dev/sveta_api_build/SVETA.Api/Data/DTO/PhotoDTO.cs
Covered lines:0
Uncovered lines:15
Coverable lines:15
Total lines:39
Line coverage:0% (0 of 15)
Covered branches:0
Total branches:12
Branch coverage:0% (0 of 12)

Metrics

MethodLine coverage Branch coverage
get_PreviewUrl()0%100%
get_FullSizeUrl()0%100%
get_PreviewWidth()0%100%
get_PreviewHeight()0%100%
get_FullSizeWidth()0%100%
get_FullSizeHeight()0%100%
op_Explicit(...)0%0%

File(s)

/opt/dev/sveta_api_build/SVETA.Api/Data/DTO/PhotoDTO.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using WinSolutions.Sveta.Server.Data.DataModel.Entities;
 3
 4namespace SVETA.Api.Data.DTO
 5{
 6    public class PhotoDTO
 7    {
 08        public string PreviewUrl { get; set; }
 9
 010        public string FullSizeUrl { get; set; }
 011        public int PreviewWidth{get;set;}
 012        public int PreviewHeight{get;set;}
 13
 014        public int FullSizeWidth{get;set;}
 015        public int FullSizeHeight{get;set;}
 016        public static explicit operator PhotoDTO(Photo photo) => new PhotoDTO
 017        {
 018            PreviewUrl = photo?.PreviewUrl,
 019            FullSizeUrl = photo?.FullSizeUrl,
 020            PreviewWidth = photo?.PreviewWidth ?? 0,
 021            PreviewHeight = photo?.PreviewHeight ?? 0,
 022            FullSizeHeight = photo?.FullSizeHeight ?? 0,
 023            FullSizeWidth = photo?.FullSizeWidth ?? 0
 024        };
 25    }
 26
 27    public class PhotoPrevDto
 28    {
 29        public int PreviewWidth{get;set;}
 30        public int PreviewHeight{get;set;}
 31        public string PreviewUrl { get; set; }
 32        public static explicit operator PhotoPrevDto(Photo photo) => new PhotoPrevDto
 33        {
 34            PreviewUrl = photo?.PreviewUrl,
 35            PreviewWidth = photo?.PreviewWidth ?? 0,
 36            PreviewHeight = photo?.PreviewHeight ?? 0,
 37        };
 38    }
 39}