-
Notifications
You must be signed in to change notification settings - Fork 42
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
Reimplement GetVariables based on new segments layer #53
Conversation
The changes look sane to me and I'd give them a go. @roben What do you say? |
Found this in the specification:
tl;dr: Need to read all |
This allows us to make parseTanModes() private, as it should be.
The new segment classes contain much more boilerplate, but no index arithmetic or magic numbers at all. The HITANSTest still succeeds without modifications.
Looks solid to me, too. Thanks for all the work @Philipp91! |
This PR adds flexible parsing for
HITANS
segments version 1 through 6 and exposes the parsed segments with a common interface. This allows reimplementingGetVariables:parseTanModes()
(which is a business logic layer function) without any interspersed parsing logic. If necessary, the common interface allows adding otherHITANS
versions without much thinking or danger of breaking other ones. The unit test remains unchanged besides plumbing.@roben I'd appreciate your review, as you are probably most familiar with how
HITANS
works across the various banks. I'm not sure if your unit tests cover all the special cases that you considered when implementing the code. In particular, I see a comment about Sparkasse declaring version 6 and you suspecting that they send version 5, yet the unit tests still works with myHITANSv6
class -- I haven't even implementedHITANSv5
.