< Summary

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

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