< Summary

Information
Class: ValidateLib.TabularData.Datatypes.NumericDatatypes.ByteDT
Assembly: validatelib.dll
File(s): C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\TabularData\Datatypes\NumericDatatypes\ByteDT.cs
Line coverage
100%
Covered lines: 14
Uncovered lines: 0
Coverable lines: 14
Total lines: 29
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBlocks covered Blocks not covered
ByteDT()40
ByteDT(...)60
ByteDT(...)60
CheckLexicalSpace()90

File(s)

C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\TabularData\Datatypes\NumericDatatypes\ByteDT.cs

#LineLine coverage
 1using ExtendedNumerics;
 2using ValidateLib.ErrorsAndWarnings.Errors;
 3using ValidateLib.Metadata.Descriptors;
 4
 5namespace ValidateLib.TabularData.Datatypes.NumericDatatypes
 6{
 7    public class ByteDT : ShortDT
 8    {
 19        BigDecimal maxValue = 127;
 110        BigDecimal minValue = -128;
 11
 112        public ByteDT() { }
 113        public ByteDT(string stringValue) : base(stringValue)
 14        {
 115            CheckLexicalSpace();
 116            ResolvePercentPermileExponent();
 117        }
 118        public ByteDT(string stringValue, FormatDescriptor format) : base(stringValue, format)
 19        {
 120            CheckLexicalSpace();
 121            ResolvePercentPermileExponent();
 122        }
 23        void CheckLexicalSpace()
 24        {
 125            if (Value < minValue || Value > maxValue)
 126                ErrorFactory.ThrowDatatypeValidationError(stringValue);
 127        }
 28    }
 29}