< Summary

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

Metrics

MethodLine coverage Branch coverage
get_Result()0%100%
.ctor()0%100%
.ctor(...)0%100%

File(s)

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

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4using System.Threading.Tasks;
 5using WinSolutions.Sveta.Server.Data.DataLoading;
 6
 7namespace SVETA.Api.Data.DTO
 8{
 9    public class UploadResultDTO
 10    {
 11        public UploadResultDTO()
 12        {
 13
 14        }
 15
 16        public UploadResultDTO(LoadingResult res, string baseUrl)
 17        {
 18            succeed = res.Errors == null || !res.Errors.Any();
 19            errorCount = res.Errors == null ? 0 : res.Errors.Count();
 20            reportUrl = $"{baseUrl.TrimEnd('/')}/api/v1/Upload/GetReport?id={res.UploadId}";
 21            uploadId = res.UploadId;
 22        }
 23
 24        public bool succeed { get; set; }
 25
 26        public int errorCount { get; set; }
 27
 28        public string reportUrl { get; set; }
 29
 30        public long uploadId { get; set; }
 31    }
 32
 33    public class UploadStringResultDto : UploadResultDTO
 34    {
 035        public List<string> Result { get; set; }
 36
 037        public UploadStringResultDto() : base()
 038        {
 39
 040        }
 41
 042        public UploadStringResultDto(LoadingResult res, string baseUrl): base (res, baseUrl)
 043        {
 44
 045        }
 46    }
 47}

Methods/Properties

get_Result()
.ctor()
.ctor(...)