< Summary

Information
Class: DatatypeTests.UnsingedByteTests
Assembly: datatypetests.dll
File(s): C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\Tests\DatatypeTests\Numeric\UnsignedByteTests.cs
Line coverage
100%
Covered lines: 14
Uncovered lines: 0
Coverable lines: 14
Total lines: 46
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

File(s)

C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\Tests\DatatypeTests\Numeric\UnsignedByteTests.cs

#LineLine coverage
 1using ValidateLib.ErrorsAndWarnings.Errors.Specific;
 2using ValidateLib.Metadata.Descriptors;
 3using ValidateLib.TabularData.Datatypes.NumericDatatypes;
 4
 5namespace DatatypeTests
 6{
 7    public class UnsingedByteTests
 8    {
 9
 10
 11        [Theory]
 12        [InlineData("+3")]
 13        [InlineData("255")]
 14        [InlineData("0")]
 15        public void ValidUnsignedByteWithoutPatternTest(string stringValue)
 116        {
 117            UnsignedByteDT ubytedt = new UnsignedByteDT(stringValue);
 118        }
 19
 20        [Theory]
 21        [InlineData("not a decimal")]
 22        [InlineData("-3.0")]
 23        [InlineData("256")]
 24        [InlineData("")]
 25
 26        public void UnsignedByteWithoutPatternInvalidValues(string stringValue)
 127        {
 128            Assert.Throws<DatatypeValidationError>(() => new UnsignedByteDT(stringValue));
 129        }
 30
 31        [Theory]
 32        [InlineData("+1;0;0", ";", null)]
 33        [InlineData("+1,0,0", ",", null)]
 34
 35        public void UnsignedByteWithFormatWithoutPatternValidValues(string stringValue, string? groupChar, string? decim
 136        {
 137            FormatDescriptor format = new FormatDescriptor
 138            {
 139                groupChar = groupChar,
 140                decimalChar = decimalChar,
 141            };
 42
 143            var ubytedt = new UnsignedByteDT(stringValue, format);
 144        }
 45    }
 46}