< Summary

Class:WinSolutions.Sveta.Server.Data.DataLoading.Records.ExternalDepartmentGoodSetting
Assembly:WinSolutions.Sveta.Server
File(s):/opt/dev/sveta_api_build/WinSolutions.Sveta.Server/Data/DataLoading/Records/ExternalDepartmentGoodSetting.cs
Covered lines:0
Uncovered lines:25
Coverable lines:25
Total lines:46
Line coverage:0% (0 of 25)
Covered branches:0
Total branches:4
Branch coverage:0% (0 of 4)

Metrics

MethodLine coverage Branch coverage
get_LineNumber()0%100%
get_Line()0%100%
get_Exception()0%100%
get_GoodName()0%100%
get_UniqueCode()0%100%
get_BarCode()0%100%
get_HasVendorCodeOnly()0%100%
GetMapping()0%0%

File(s)

/opt/dev/sveta_api_build/WinSolutions.Sveta.Server/Data/DataLoading/Records/ExternalDepartmentGoodSetting.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.Text;
 4using WinSolutions.Sveta.Server.Data.DataModel.Entities;
 5
 6namespace WinSolutions.Sveta.Server.Data.DataLoading.Records
 7{
 8    public class ExternalDepartmentGoodSetting : DepartmentGoodSetting, IExternalRecord
 9    {
 010        public int LineNumber { get; set; }
 11
 012        public List<string> Line { get; set; } = new List<string>();
 13
 014        public Exception Exception { get; set; }
 15
 016        public string GoodName { get; set; }
 17
 018        public string UniqueCode { get; set; }
 19
 020        public string BarCode { get; set; }
 21
 022        public bool HasVendorCodeOnly { get; set; }
 23
 24        public IEnumerable<FieldMap> GetMapping()
 025        {
 026            int x = 0;
 027            var type = this.GetType();
 028            foreach (var p in new[]
 029            {
 030                new {Prop = nameof(UniqueCode), Sample = "{0}", NameRus = "**Уникальный код товара"},
 031                new {Prop = nameof(VendorCode), Sample = "ТП{0:D6}", NameRus = "**Артикул"},
 032                new {Prop = nameof(BarCode), Sample = "{0}", NameRus = "**Штрихкод"},
 033                new {Prop = nameof(GoodName), Sample = "Название товара {0}", NameRus = "**Название товара"},
 034                new {Prop = nameof(MinQuantity), Sample = "{0}", NameRus = "*Минимальная партия поставки"},
 035                new {Prop = nameof(PickingQuantum), Sample = "{0}", NameRus = "*Квант поставки"},
 036                new {Prop = nameof(ShowcaseVisible), Sample = Boolean.TrueString, NameRus = "*Видимость на витрине"}
 037            })
 038            {
 039                yield return new FieldMap(x, type.GetProperty(p.Prop)) { SampleData = p.Sample, NameRus = p.NameRus };
 40
 041                x++;
 042            }
 043        }
 44
 45    }
 46}