-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f471891
commit f266c3c
Showing
35 changed files
with
1,023 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
brew 'mint' | ||
brew 'mint' | ||
brew 'maven' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
github "Quick/Nimble" ~> 9.0 | ||
github "tadija/AEXML" "4.5.0" | ||
github "tadija/AEXML" ~> 4.0 | ||
github "hectr/swift-stream-reader" "0.3.0" | ||
github "swiftsocket/SwiftSocket" "2e6ba27140a29fae8a6331ba4463312e0c71a6b0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -308,4 +308,4 @@ RUBY VERSION | |
ruby 2.6.5p114 | ||
|
||
BUNDLED WITH | ||
2.3.16 | ||
2.3.20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
IntegrationTests/HealthCardControl/HealthCardTypeExtChangeReferenceDataIntegrationTest.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// | ||
// Copyright (c) 2022 gematik GmbH | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the License); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an 'AS IS' BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import Foundation | ||
import HealthCardAccess | ||
@testable import HealthCardControl | ||
import Nimble | ||
import XCTest | ||
|
||
final class HealthCardTypeExtChangeReferenceDataIntegrationTest: CardSimulationTerminalTestCase { | ||
override class var configFileInput: String { | ||
"Configuration/configuration_EGK_G2_1_80276883110000095711_GuD_TCP.xml" | ||
} | ||
|
||
override class var healthCardStatusInput: HealthCardStatus { .valid(cardType: .egk(generation: .g2_1)) } | ||
|
||
func testChangeReferenceDataEgk21_success() throws { | ||
let old = "123456" as Format2Pin | ||
let new = "654321" as Format2Pin | ||
|
||
expect( | ||
try Self.healthCard.changeReferenceDataSetNewPin( | ||
old: old, | ||
new: new | ||
) | ||
.test() | ||
) == ChangeReferenceDataResponse.success | ||
} | ||
|
||
func testChangeReferenceDataEgk21_wrongPasswordLength() throws { | ||
let old = "123456" as Format2Pin | ||
let new = "654321123456" as Format2Pin | ||
|
||
expect( | ||
try Self.healthCard.changeReferenceDataSetNewPin( | ||
old: old, | ||
new: new, | ||
type: EgkFileSystem.Pin.mrpinHome, | ||
dfSpecific: false | ||
) | ||
.test() | ||
) == ChangeReferenceDataResponse.wrongPasswordLength | ||
} | ||
} |
69 changes: 69 additions & 0 deletions
69
...tionTests/HealthCardControl/HealthCardTypeExtChangeReferenceDataIntegrationTestCont.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// | ||
// Copyright (c) 2022 gematik GmbH | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the License); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an 'AS IS' BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import Foundation | ||
import HealthCardAccess | ||
@testable import HealthCardControl | ||
import Nimble | ||
import XCTest | ||
|
||
// Note: This continuation of `HealthCardTypeExtChangeReferenceDataIntegrationTest` exists to separate | ||
// the count dependent tests from the other ones. | ||
final class HealthCardTypeExtChangeReferenceDataIntegrationTestCont: CardSimulationTerminalTestCase { | ||
override class var configFileInput: String { | ||
"Configuration/configuration_EGK_G2_1_80276883110000095711_GuD_TCP.xml" | ||
} | ||
|
||
override class var healthCardStatusInput: HealthCardStatus { | ||
.valid(cardType: .egk(generation: .g2_1)) | ||
} | ||
|
||
func testChangeReferenceDataEgk21_wrongSecretWarning() throws { | ||
let wrongOld = "9999999" as Format2Pin | ||
let correctOld = "123456" as Format2Pin | ||
let new = "654321" as Format2Pin | ||
|
||
expect( | ||
try Self.healthCard.changeReferenceDataSetNewPin( | ||
old: wrongOld, | ||
new: new, | ||
type: EgkFileSystem.Pin.mrpinHome, | ||
dfSpecific: false | ||
) | ||
.test() | ||
) == ChangeReferenceDataResponse.wrongSecretWarning(retryCount: 2) | ||
|
||
expect( | ||
try Self.healthCard.changeReferenceDataSetNewPin( | ||
old: wrongOld, | ||
new: new, | ||
type: EgkFileSystem.Pin.mrpinHome, | ||
dfSpecific: false | ||
) | ||
.test() | ||
) == ChangeReferenceDataResponse.wrongSecretWarning(retryCount: 1) | ||
|
||
expect( | ||
try Self.healthCard.changeReferenceDataSetNewPin( | ||
old: correctOld, | ||
new: new, | ||
type: EgkFileSystem.Pin.mrpinHome, | ||
dfSpecific: false | ||
) | ||
.test() | ||
) == ChangeReferenceDataResponse.success | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.