Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: PhoneNumberValidator #62

Draft
wants to merge 87 commits into
base: main
Choose a base branch
from
Draft

WIP: PhoneNumberValidator #62

wants to merge 87 commits into from

Conversation

Anrufliste
Copy link
Collaborator

Prepare new class PhoneNumberValidator - currently just reusing PhoneLibWrapper to access PhoneLib logic. First testcase set taken from PhoneNumberNormalizer as starting point. Define expected behaviour and outcomment all testcases which currently do not work.

Those can be used to test logic addition to capture more detailed behaviour than phone lib. After standard cases work, next phase will be to include special testcases from PhoneNumberUtil test folder.

Anrufliste and others added 30 commits May 1, 2024 14:57
…LibWrapper to access PhoneLib logic. First testcase set taken from PhoneNumberNormalizer as starting point. Define expected behaviour and outcomment all testcases which currently do not work.

Those can be used to test logic addition to capture more detailed behaviour than phone lib. After standard cases work, next phase will be to include special testcases from PhoneNumberUtil test folder.
1) USING IDP & CC
1a) From Foreign Country
1b) Within the Country
2) Not Using IDP & CC
2a) Region is not Using NAC
2b) Region may use Nac
2bI) NAC and NDC is used
2bII) No NAC is used
…LibWrapper to access PhoneLib logic. First testcase set taken from PhoneNumberNormalizer as starting point. Define expected behaviour and outcomment all testcases which currently do not work.

Those can be used to test logic addition to capture more detailed behaviour than phone lib. After standard cases work, next phase will be to include special testcases from PhoneNumberUtil test folder.
1) USING IDP & CC
1a) From Foreign Country
1b) Within the Country
2) Not Using IDP & CC
2a) Region is not Using NAC
2b) Region may use Nac
2bI) NAC and NDC is used
2bII) No NAC is used
…C of a city) but for mobile numbers (NDC of a mobile network) see https://issuetracker.google.com/issues/341947688 - testcases in IsPossibleNumberWithReasonTest and IsValidNumberTest are adapted.
…C of a city) but for mobile numbers (NDC of a mobile network) see https://issuetracker.google.com/issues/341947688 - testcases in IsPossibleNumberWithReasonTest and IsValidNumberTest are adapted.
* Use PhoneLib 8.13.38 and prepare release (removed NAC from MX numberplan - as done 5 years ago)

* Start Snapshot 1.2.4 after release 1.2.3
…ed results for 110 and 112 short code tests.

Also add test to check a subscriber number is not starting with a digit equaling NAC, when (used) NDC not mandatory.
…t code because it is usable with NDC and from outside of germany with IDP+CC (for last case IS_POSSIBLE_INTERNATIONAL_ONLY is used).
…kShortCodeOverlapping method and introduce ShortCodeUseable enum, to controll the usage of the isUsable... functions of the numberplan object.
…d link to issues reported to google

Added new issue for 115 and updated issue status information.
…g Validation Code to handle short code definition via prefix and length (range instead of a single one)
* Use PhoneLib 8.13.39 and prepare release

* Start Snapshot 1.2.5 after release 1.2.4
…n Code to handle short code definition which marks a short code as reserve (not valid at all) and introducing a new result type: INVALID_RESERVE_NUMBER
Anrufliste and others added 30 commits October 4, 2024 18:09
* Use PhoneLib 8.13.47 and prepare release

* Start Snapshot 1.2.10 after release 1.2.9
* Use PhoneLib 8.13.47 and prepare release

* Start Snapshot 1.2.10 after release 1.2.9

* Dependency Upgrade because of CVE-2024-38808 in spring-expression 5.3.32:
- org.springframework.spring-context 5.3.32 >>> 5.3.39
- org.apache.commons.commons-lang3 3.12.0 >>> 3.17.0
- io.swagger.swagger-annotations 1.6.11 >>> 1.6.14
- com.fasterxml.jackson.core.jackson-core 2.15.2 >>> 2.18.0
- com.fasterxml.jackson.core.jackson-annotations 2.15.2 >>> 2.8.0
- com.fasterxml.jackson.core.jackson-databind 2.15.2 >>> 2.18.0
- org.slf4j.slf4j-api 2.0.7 >>> 2.0.16
- org.codehaus.groovy.groovy-all 3.0.17 >>> 3.0.22
- org.spockframework.spock-core 2.3-groovy-3.0 >>> 2.4-M4-groovy-3.0
- org.testng.testng 7.8.0 >>> 7.10.2

Fixing code in IsValidNumberTest and correct Expected Fails for:
- 016013
- 016250
- 016255
- 016399
- 0181
- 01988
…LibWrapper to access PhoneLib logic. First testcase set taken from PhoneNumberNormalizer as starting point. Define expected behaviour and outcomment all testcases which currently do not work.

Those can be used to test logic addition to capture more detailed behaviour than phone lib. After standard cases work, next phase will be to include special testcases from PhoneNumberUtil test folder.
1) USING IDP & CC
1a) From Foreign Country
1b) Within the Country
2) Not Using IDP & CC
2a) Region is not Using NAC
2b) Region may use Nac
2bI) NAC and NDC is used
2bII) No NAC is used
…C of a city) but for mobile numbers (NDC of a mobile network) see https://issuetracker.google.com/issues/341947688 - testcases in IsPossibleNumberWithReasonTest and IsValidNumberTest are adapted.
…C of a city) but for mobile numbers (NDC of a mobile network) see https://issuetracker.google.com/issues/341947688 - testcases in IsPossibleNumberWithReasonTest and IsValidNumberTest are adapted.
…ed results for 110 and 112 short code tests.

Also add test to check a subscriber number is not starting with a digit equaling NAC, when (used) NDC not mandatory.
…t code because it is usable with NDC and from outside of germany with IDP+CC (for last case IS_POSSIBLE_INTERNATIONAL_ONLY is used).
…kShortCodeOverlapping method and introduce ShortCodeUseable enum, to controll the usage of the isUsable... functions of the numberplan object.
…d link to issues reported to google

Added new issue for 115 and updated issue status information.
…g Validation Code to handle short code definition via prefix and length (range instead of a single one)
…n Code to handle short code definition which marks a short code as reserve (not valid at all) and introducing a new result type: INVALID_RESERVE_NUMBER
1) USING IDP & CC
1a) From Foreign Country
1b) Within the Country
2) Not Using IDP & CC
2a) Region is not Using NAC
2b) Region may use Nac
2bI) NAC and NDC is used
2bII) No NAC is used
1) USING IDP & CC
1a) From Foreign Country
1b) Within the Country
2) Not Using IDP & CC
2a) Region is not Using NAC
2b) Region may use Nac
2bI) NAC and NDC is used
2bII) No NAC is used
…C of a city) but for mobile numbers (NDC of a mobile network) see https://issuetracker.google.com/issues/341947688 - testcases in IsPossibleNumberWithReasonTest and IsValidNumberTest are adapted.
…t code because it is usable with NDC and from outside of germany with IDP+CC (for last case IS_POSSIBLE_INTERNATIONAL_ONLY is used).
…kShortCodeOverlapping method and introduce ShortCodeUseable enum, to controll the usage of the isUsable... functions of the numberplan object.
…d link to issues reported to google

Added new issue for 115 and updated issue status information.
…g Validation Code to handle short code definition via prefix and length (range instead of a single one)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant