< Summary

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

#LineLine coverage
 1using ValidateLib.ErrorsAndWarnings.Errors.Specific;
 2using ValidateLib.TabularData.Datatypes;
 3using ValidateLib.TabularData.Datatypes.DateDatatypes;
 4
 5namespace DatatypeTests
 6{
 7    public class GMonthDatyTests
 8    {
 9
 10
 11        [Theory]
 12        [InlineData("--04-12")]
 13        [InlineData("--04-12-05:00")]
 14        [InlineData("--04-12Z")]
 15        public void ValidGMonthDayWithoutPatternTest(string stringValue)
 116        {
 117            GMonthDayDT gmonth = new GMonthDayDT(stringValue);
 118            DatatypeFactory.GetDatatype(stringValue, "gMonthDay", null);
 119        }
 20
 21        [Theory]
 22        [InlineData("not gmonth")]
 23        [InlineData("04-12")]
 24        [InlineData("--04-31")]
 25        [InlineData("--4-6")]
 26        [InlineData("2015-03-15T15:02:37")]
 27        [InlineData("")]
 28        public void GMonthDAyPatternInvalidValues(string stringValue)
 129        {
 130            Assert.Throws<DatatypeValidationError>(() => DatatypeFactory.GetDatatype(stringValue, "gMonthDay", null));
 131        }
 32
 33    }
 34}