Added support for Norwegian test numbers, starting with 2 and 3. Thes… #89
GitHub Actions / Test Report
succeeded
Aug 23, 2024 in 0s
191 passed, 0 failed and 0 skipped
✅ coverage/test-results.trx
191 tests were completed in 2s with 191 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
VatValidation.Tests.CountryBeTests | 27✅ | 19ms | ||
VatValidation.Tests.CountryDkTests | 13✅ | 2ms | ||
VatValidation.Tests.CountryEeTests | 16✅ | 6ms | ||
VatValidation.Tests.CountryFiTests | 12✅ | 3ms | ||
VatValidation.Tests.CountryGetterTests | 14✅ | 38ms | ||
VatValidation.Tests.CountryNlTests | 15✅ | 23ms | ||
VatValidation.Tests.CountryNoTests | 16✅ | 4ms | ||
VatValidation.Tests.CountryPtTests | 17✅ | 2ms | ||
VatValidation.Tests.CountrySeTests | 22✅ | 3ms | ||
VatValidation.Tests.TestcasesFromXmlComments | 29✅ | 14ms | ||
VatValidation.Tests.VatNumberTests | 10✅ | 23ms |
✅ VatValidation.Tests.CountryBeTests
✅ TryParseTest(expectedValid: False, input: "0566988259", expectNational: "")
✅ TryParseTest(expectedValid: False, input: "566988259", expectNational: "")
✅ TryParseTest(expectedValid: False, input: "BE0566988258", expectNational: "")
✅ TryParseTest(expectedValid: True, input: "0427.155.930", expectNational: "0427.155.930")
✅ TryParseTest(expectedValid: True, input: "0427155930", expectNational: "0427.155.930")
✅ TryParseTest(expectedValid: True, input: "427.155.930", expectNational: "427.155.930")
✅ TryParseTest(expectedValid: True, input: "427155930", expectNational: "427.155.930")
✅ TryParseTest(expectedValid: True, input: "BE 0566988259", expectNational: "0566.988.259")
✅ TryParseTest(expectedValid: True, input: "BE0427155930", expectNational: "0427.155.930")
✅ TryParseTest(expectedValid: True, input: "BE0566988259", expectNational: "0566.988.259")
✅ VatStripValidNational(expectedValid: False, input: "427 155 931", expectNational: "0427.155.931", expectVat: "BE 0427155931", expectedStriped: "0427155931")
✅ VatStripValidNational(expectedValid: False, input: "427.155.931", expectNational: "0427.155.931", expectVat: "BE 0427155931", expectedStriped: "0427155931")
✅ VatStripValidNational(expectedValid: True, input: "0427.155.930", expectNational: "0427.155.930", expectVat: "BE 0427155930", expectedStriped: "0427155930")
✅ VatStripValidNational(expectedValid: True, input: "0566.988.259", expectNational: "0566.988.259", expectVat: "BE 0566988259", expectedStriped: "0566988259")
✅ VatStripValidNational(expectedValid: True, input: "0566988259", expectNational: "0566.988.259", expectVat: "BE 0566988259", expectedStriped: "0566988259")
✅ VatStripValidNational(expectedValid: True, input: "427 155 930", expectNational: "0427.155.930", expectVat: "BE 0427155930", expectedStriped: "0427155930")
✅ VatStripValidNational(expectedValid: True, input: "566.988.259", expectNational: "0566.988.259", expectVat: "BE 0566988259", expectedStriped: "0566988259")
✅ VatTest(expectedValid: False, input: "0566.988.258", expectNational: "0566.988.258", expectVat: "BE 0566988258", expectedStriped: "0566988258")
✅ VatTest(expectedValid: False, input: "0566988258", expectNational: "0566988258", expectVat: "BE 0566988258", expectedStriped: "0566988258")
✅ VatTest(expectedValid: False, input: "566.988.258", expectNational: "566.988.258", expectVat: "BE 0566988258", expectedStriped: "0566988258")
✅ VatTest(expectedValid: False, input: "66.988.259", expectNational: "66.988.259", expectVat: "BE 66988259", expectedStriped: "66988259")
✅ VatTest(expectedValid: False, input: "66988259", expectNational: "66988259", expectVat: "BE 66988259", expectedStriped: "66988259")
✅ VatTest(expectedValid: True, input: "0427.155.930", expectNational: "0427.155.930", expectVat: "BE 0427155930", expectedStriped: "0427155930")
✅ VatTest(expectedValid: True, input: "0566.988.259", expectNational: "0566.988.259", expectVat: "BE 0566988259", expectedStriped: "0566988259")
✅ VatTest(expectedValid: True, input: "0566988259", expectNational: "0566.988.259", expectVat: "BE 0566988259", expectedStriped: "0566988259")
✅ VatTest(expectedValid: True, input: "427.155.930", expectNational: "427.155.930", expectVat: "BE 0427155930", expectedStriped: "0427155930")
✅ VatTest(expectedValid: True, input: "566.988.259", expectNational: "566.988.259", expectVat: "BE 0566988259", expectedStriped: "0566988259")
✅ VatValidation.Tests.CountryDkTests
✅ TryParseTest(expectedValid: False, input: "DK 25313762", expectNational: "")
✅ TryParseTest(expectedValid: True, input: "25313763", expectNational: "25 31 37 63")
✅ TryParseTest(expectedValid: True, input: "DK 25 31 37 63", expectNational: "25 31 37 63")
✅ TryParseTest(expectedValid: True, input: "DK 25313763", expectNational: "25 31 37 63")
✅ TryParseTest(expectedValid: True, input: "DK 29 40 34 73", expectNational: "29 40 34 73")
✅ TryParseTest(expectedValid: True, input: "DK25313763", expectNational: "25 31 37 63")
✅ VatTest(expectedValid: False, input: "05 31 37 63", expectNational: "05 31 37 63", expectVat: "DK 05313763")
✅ VatTest(expectedValid: False, input: "05313763", expectNational: "05313763", expectVat: "DK 05313763")
✅ VatTest(expectedValid: False, input: "25 31 37 60", expectNational: "25 31 37 60", expectVat: "DK 25313760")
✅ VatTest(expectedValid: False, input: "25313760", expectNational: "25313760", expectVat: "DK 25313760")
✅ VatTest(expectedValid: True, input: "25 31 37 63", expectNational: "25 31 37 63", expectVat: "DK 25313763")
✅ VatTest(expectedValid: True, input: "25313763", expectNational: "25 31 37 63", expectVat: "DK 25313763")
✅ VatTest(expectedValid: True, input: "29403473", expectNational: "29 40 34 73", expectVat: "DK 29403473")
✅ VatValidation.Tests.CountryEeTests
✅ TryParseTest(expectedValid: False, input: "EE 999 999 999", expectNational: "")
✅ TryParseTest(expectedValid: False, input: "EE999999990", expectNational: "")
✅ TryParseTest(expectedValid: True, input: "100594102", expectNational: "100594102")
✅ TryParseTest(expectedValid: True, input: "100931558", expectNational: "100931558")
✅ TryParseTest(expectedValid: True, input: "EE 100 931 558", expectNational: "100931558")
✅ TryParseTest(expectedValid: True, input: "EE 100594102", expectNational: "100594102")
✅ TryParseTest(expectedValid: True, input: "EE 100931558", expectNational: "100931558")
✅ VatTest(expectedValid: False, input: "099999999", expectNational: "099999999", expectVat: "EE 099999999")
✅ VatTest(expectedValid: False, input: "100594103", expectNational: "100594103", expectVat: "EE 100594103")
✅ VatTest(expectedValid: False, input: "999 999 99", expectNational: "999 999 99", expectVat: "EE 999 999 99")
✅ VatTest(expectedValid: False, input: "999 999 999", expectNational: "999 999 999", expectVat: "EE 999 999 999")
✅ VatTest(expectedValid: False, input: "99999999", expectNational: "99999999", expectVat: "EE 99999999")
✅ VatTest(expectedValid: False, input: "999999999", expectNational: "999999999", expectVat: "EE 999999999")
✅ VatTest(expectedValid: True, input: "100 931 558", expectNational: "100931558", expectVat: "EE 100931558")
✅ VatTest(expectedValid: True, input: "100594102", expectNational: "100594102", expectVat: "EE 100594102")
✅ VatTest(expectedValid: True, input: "100931558", expectNational: "100931558", expectVat: "EE 100931558")
✅ VatValidation.Tests.CountryFiTests
✅ TryParseTest(expectedValid: False, input: "FI 0201723-4", expectNational: "")
✅ TryParseTest(expectedValid: False, input: "FI 02017234", expectNational: "")
✅ TryParseTest(expectedValid: True, input: "02017244", expectNational: "0201724-4")
✅ TryParseTest(expectedValid: True, input: "FI 0201724-4", expectNational: "0201724-4")
✅ TryParseTest(expectedValid: True, input: "FI 02017244", expectNational: "0201724-4")
✅ TryParseTest(expectedValid: True, input: "FI02017244", expectNational: "0201724-4")
✅ VatTest(expectedValid: False, input: "0201723-4", expectNational: "0201723-4", expectVat: "FI 02017234")
✅ VatTest(expectedValid: False, input: "02017234", expectNational: "02017234", expectVat: "FI 02017234")
✅ VatTest(expectedValid: False, input: "201723-4", expectNational: "201723-4", expectVat: "FI 2017234")
✅ VatTest(expectedValid: False, input: "2017234", expectNational: "2017234", expectVat: "FI 2017234")
✅ VatTest(expectedValid: True, input: "0201724-4", expectNational: "0201724-4", expectVat: "FI 02017244")
✅ VatTest(expectedValid: True, input: "02017244", expectNational: "0201724-4", expectVat: "FI 02017244")
✅ VatValidation.Tests.CountryGetterTests
✅ EnsureGetCountrieCodesTest
✅ GetCountryTest(cc: "se", expectedCc: "SE")
✅ GetCountryTest(cc: "sE", expectedCc: "SE")
✅ ValidateCountryTypesAndCcTest(ccKey: "BE")
✅ ValidateCountryTypesAndCcTest(ccKey: "DK")
✅ ValidateCountryTypesAndCcTest(ccKey: "EE")
✅ ValidateCountryTypesAndCcTest(ccKey: "ES")
✅ ValidateCountryTypesAndCcTest(ccKey: "FI")
✅ ValidateCountryTypesAndCcTest(ccKey: "LT")
✅ ValidateCountryTypesAndCcTest(ccKey: "LV")
✅ ValidateCountryTypesAndCcTest(ccKey: "NL")
✅ ValidateCountryTypesAndCcTest(ccKey: "NO")
✅ ValidateCountryTypesAndCcTest(ccKey: "PT")
✅ ValidateCountryTypesAndCcTest(ccKey: "SE")
✅ VatValidation.Tests.CountryNlTests
✅ TryParseTest(expectedValid: False, input: "861994772C02", expectNational: "")
✅ TryParseTest(expectedValid: True, input: "861994772B01", expectNational: "NL861994772B01")
✅ TryParseTest(expectedValid: True, input: "861994772B02", expectNational: "NL861994772B02")
✅ VatStripValidNational(expectedValid: False, input: "861994772B", expectNational: "NL861994772B", expectVat: "", expectedStriped: "861994772B")
✅ VatStripValidNational(expectedValid: False, input: "861994772C01", expectNational: "NL861994772C01", expectVat: "", expectedStriped: "861994772C01")
✅ VatStripValidNational(expectedValid: True, input: "86 1994772B01", expectNational: "NL861994772B01", expectVat: "NL861994772B01", expectedStriped: "861994772B01")
✅ VatStripValidNational(expectedValid: True, input: "861994772B01", expectNational: "NL861994772B01", expectVat: "NL861994772B01", expectedStriped: "861994772B01")
✅ VatTest(expectedValid: False, input: "824155891B01", expectNational: "824155891B01", expectVat: "NL824155891B01", expectedStriped: "824155891B01")
✅ VatTest(expectedValid: False, input: "NL824155891B01", expectNational: "NL824155891B01", expectVat: "NL824155891B01", expectedStriped: "824155891B01")
✅ VatTest(expectedValid: False, input: "NL82x155891", expectNational: "NL82x155891", expectVat: "", expectedStriped: "NL82155891")
✅ VatTest(expectedValid: False, input: "NL82x155891B01", expectNational: "NL82x155891B01", expectVat: "", expectedStriped: "82155891B01")
✅ VatTest(expectedValid: True, input: "004495445B01", expectNational: "NL004495445B01", expectVat: "NL004495445B01", expectedStriped: "004495445B01")
✅ VatTest(expectedValid: True, input: "824155890B01", expectNational: "NL824155890B01", expectVat: "NL824155890B01", expectedStriped: "824155890B01")
✅ VatTest(expectedValid: True, input: "824155890B08", expectNational: "NL824155890B08", expectVat: "NL824155890B08", expectedStriped: "824155890B08")
✅ VatTest(expectedValid: True, input: "NL004495445B01", expectNational: "NL004495445B01", expectVat: "NL004495445B01", expectedStriped: "004495445B01")
✅ VatValidation.Tests.CountryNoTests
✅ TryParseTest(expectedValid: False, input: "977074011", expectNational: "")
✅ TryParseTest(expectedValid: True, input: "212409472", expectNational: "212 409 472")
✅ TryParseTest(expectedValid: True, input: "310033243", expectNational: "310 033 243")
✅ TryParseTest(expectedValid: True, input: "977074010", expectNational: "977 074 010")
✅ TryParseTest(expectedValid: True, input: "NO 977 074 010", expectNational: "977 074 010")
✅ TryParseTest(expectedValid: True, input: "NO 977 074 010MVA", expectNational: "977 074 010")
✅ TryParseTest(expectedValid: True, input: "NO 977074010", expectNational: "977 074 010")
✅ TryParseTest(expectedValid: True, input: "NO977074010", expectNational: "977 074 010")
✅ VatTest(expectedValid: False, input: "777074016", expectNational: "777074016", expectVat: "")
✅ VatTest(expectedValid: False, input: "977 074 01", expectNational: "977 074 01", expectVat: "")
✅ VatTest(expectedValid: False, input: "977 074 010x", expectNational: "977 074 010", expectVat: "NO 977 074 010")
✅ VatTest(expectedValid: False, input: "977 074 011", expectNational: "977 074 011", expectVat: "NO 977 074 011")
✅ VatTest(expectedValid: False, input: "97707401", expectNational: "97707401", expectVat: "")
✅ VatTest(expectedValid: False, input: "977074011", expectNational: "977074011", expectVat: "NO 977074011")
✅ VatTest(expectedValid: True, input: "977 074 010", expectNational: "977 074 010", expectVat: "NO 977 074 010")
✅ VatTest(expectedValid: True, input: "977074010", expectNational: "977 074 010", expectVat: "NO 977 074 010")
✅ VatValidation.Tests.CountryPtTests
✅ TryParseTest(expectedValid: False, input: "PT 999 999 999", expectNational: "")
✅ TryParseTest(expectedValid: True, input: "287024008", expectNational: "287024008")
✅ TryParseTest(expectedValid: True, input: "501442600", expectNational: "501442600")
✅ TryParseTest(expectedValid: True, input: "999999990", expectNational: "999999990")
✅ TryParseTest(expectedValid: True, input: "PT 287024008", expectNational: "287024008")
✅ TryParseTest(expectedValid: True, input: "PT 501442600", expectNational: "501442600")
✅ TryParseTest(expectedValid: True, input: "PT 999 999 990", expectNational: "999999990")
✅ TryParseTest(expectedValid: True, input: "PT 999999990", expectNational: "999999990")
✅ TryParseTest(expectedValid: True, input: "PT999999990", expectNational: "999999990")
✅ VatTest(expectedValid: False, input: "099999999", expectNational: "099999999", expectVat: "PT 099999999")
✅ VatTest(expectedValid: False, input: "999 999 99", expectNational: "999 999 99", expectVat: "PT 999 999 99")
✅ VatTest(expectedValid: False, input: "999 999 999", expectNational: "999 999 999", expectVat: "PT 999 999 999")
✅ VatTest(expectedValid: False, input: "99999999", expectNational: "99999999", expectVat: "PT 99999999")
✅ VatTest(expectedValid: False, input: "999999999", expectNational: "999999999", expectVat: "PT 999999999")
✅ VatTest(expectedValid: True, input: "287024008", expectNational: "287024008", expectVat: "PT 287024008")
✅ VatTest(expectedValid: True, input: "501442600", expectNational: "501442600", expectVat: "PT 501442600")
✅ VatTest(expectedValid: True, input: "999999990", expectNational: "999999990", expectVat: "PT 999999990")
✅ VatValidation.Tests.CountrySeTests
✅ TryParseTest(expectedValid: False, input: "0566988259", expectNational: "")
✅ TryParseTest(expectedValid: False, input: "5566778898", expectNational: "")
✅ TryParseTest(expectedValid: False, input: "566988259", expectNational: "")
✅ TryParseTest(expectedValid: True, input: "5566778501", expectNational: "556677-8501")
✅ TryParseTest(expectedValid: True, input: "5566778899", expectNational: "556677-8899")
✅ TryParseTest(expectedValid: True, input: "SE 1010101010 01", expectNational: "101010-1010")
✅ TryParseTest(expectedValid: True, input: "SE 556677-8501", expectNational: "556677-8501")
✅ TryParseTest(expectedValid: True, input: "SE 556677-8899", expectNational: "556677-8899")
✅ TryParseTest(expectedValid: True, input: "SE 5566778501", expectNational: "556677-8501")
✅ TryParseTest(expectedValid: True, input: "SE 5566778899", expectNational: "556677-8899")
✅ TryParseTest(expectedValid: True, input: "SE101010101001", expectNational: "101010-1010")
✅ TryParseTest(expectedValid: True, input: "SE556677-8501", expectNational: "556677-8501")
✅ TryParseTest(expectedValid: True, input: "SE556677-8899", expectNational: "556677-8899")
✅ TryParseTest(expectedValid: True, input: "SE5566778501", expectNational: "556677-8501")
✅ TryParseTest(expectedValid: True, input: "SE5566778899", expectNational: "556677-8899")
✅ TryParseTest(expectedValid: True, input: "SE556677889901", expectNational: "556677-8899")
✅ VatTest(expectedValid: False, input: "556677-8890", expectNational: "556677-8890", expectVat: "SE 5566778890 01", expectedStriped: "5566778890")
✅ VatTest(expectedValid: False, input: "55667788", expectNational: "55667788", expectVat: "SE 55667788 01", expectedStriped: "55667788")
✅ VatTest(expectedValid: False, input: "5566778890", expectNational: "5566778890", expectVat: "SE 5566778890 01", expectedStriped: "5566778890")
✅ VatTest(expectedValid: True, input: "1010101010", expectNational: "101010-1010", expectVat: "SE 1010101010 01", expectedStriped: "1010101010")
✅ VatTest(expectedValid: True, input: "556677-8899", expectNational: "556677-8899", expectVat: "SE 5566778899 01", expectedStriped: "5566778899")
✅ VatTest(expectedValid: True, input: "5566778899", expectNational: "556677-8899", expectVat: "SE 5566778899 01", expectedStriped: "5566778899")
✅ VatValidation.Tests.TestcasesFromXmlComments
✅ EnsureGetCountryTestCasesData(ccKey: "BE")
✅ EnsureGetCountryTestCasesData(ccKey: "DK")
✅ EnsureGetCountryTestCasesData(ccKey: "EE")
✅ EnsureGetCountryTestCasesData(ccKey: "ES")
✅ EnsureGetCountryTestCasesData(ccKey: "FI")
✅ EnsureGetCountryTestCasesData(ccKey: "LT")
✅ EnsureGetCountryTestCasesData(ccKey: "LV")
✅ EnsureGetCountryTestCasesData(ccKey: "NL")
✅ EnsureGetCountryTestCasesData(ccKey: "NO")
✅ EnsureGetCountryTestCasesData(ccKey: "PT")
✅ EnsureGetCountryTestCasesData(ccKey: "SE")
✅ EnsureGetCountryTestCasesTestSource
✅ GetXmlDocumentationTest(ccKey: "ES", testline: "invalid, in: A58818502, national: A58818502, vat: "···)
✅ GetXmlDocumentationTest(ccKey: "ES", testline: "invalid, in: A5881850x, national: A5881850x, vat: "···)
✅ GetXmlDocumentationTest(ccKey: "ES", testline: "valid, in: A58818501, national: A58818501, vat: ES"···)
✅ GetXmlDocumentationTest(ccKey: "ES", testline: "valid, in: B12345674, national: B12345674, vat: ES"···)
✅ GetXmlDocumentationTest(ccKey: "ES", testline: "valid, in: S1454158E, national: S1454158E, vat: ES"···)
✅ GetXmlDocumentationTest(ccKey: "LT", testline: "invalid, in: 100001919018, national: 100001919018,"···)
✅ GetXmlDocumentationTest(ccKey: "LT", testline: "invalid, in: 11951151x, national: 11951151x, vat: "···)
✅ GetXmlDocumentationTest(ccKey: "LT", testline: "invalid, in: 119511525, national: 119511525, vat: "···)
✅ GetXmlDocumentationTest(ccKey: "LT", testline: "valid, in: 100001919017, national: 100001919017, v"···)
✅ GetXmlDocumentationTest(ccKey: "LT", testline: "valid, in: 119511515, national: 119511515, vat: LT"···)
✅ GetXmlDocumentationTest(ccKey: "LT", testline: "valid, in: 241102419, national: 241102419, vat: LT"···)
✅ GetXmlDocumentationTest(ccKey: "LT", testline: "valid, in: LT633 878 716, national: 633878716, vat"···)
✅ GetXmlDocumentationTest(ccKey: "LV", testline: "invalid, in: 16117519997, national: 16117519997, v"···)
✅ GetXmlDocumentationTest(ccKey: "LV", testline: "invalid, in: 4000352160, national: 4000352160, vat"···)
✅ GetXmlDocumentationTest(ccKey: "LV", testline: "invalid, in: 40003521601, national: 40003521601, v"···)
✅ GetXmlDocumentationTest(ccKey: "LV", testline: "valid, in: 40003521600, national: 40003521600, vat"···)
✅ GetXmlDocumentationTest(ccKey: "LV", testline: "valid, in: LV 4000 3521 600, national: 40003521600"···)
✅ VatValidation.Tests.VatNumberTests
✅ VatNumberCastEquals(expected: False, vatstr1: "SE 0566988259", vatstr2: "BE 0566988259")
✅ VatNumberCastEquals(expected: False, vatstr1: "SE 101010-1010", vatstr2: "SE 1010101010")
✅ VatNumberCastEquals(expected: False, vatstr1: "SE 1010101010 01", vatstr2: "SE 101010-1010")
✅ VatNumberCastEquals(expected: False, vatstr1: "y", vatstr2: "x")
✅ VatNumberCastEquals(expected: True, vatstr1: "x", vatstr2: "x")
✅ VatNumberEquals(expected: False, vatstr1: "SE 0566988259", vatstr2: "BE 0566988259")
✅ VatNumberEquals(expected: True, vatstr1: "SE 101010-1010", vatstr2: "SE 1010101010")
✅ VatNumberEquals(expected: True, vatstr1: "SE 1010101010 01", vatstr2: "SE 101010-1010")
✅ VatNumberEquals(expected: True, vatstr1: "x", vatstr2: "x")
✅ VatNumberEquals(expected: True, vatstr1: "y", vatstr2: "x")
Loading