Skip to content

Commit

Permalink
Merge pull request #53 from niscy-eudiw/main
Browse files Browse the repository at this point in the history
Fix some unit tests
  • Loading branch information
phisakel authored Dec 12, 2024
2 parents 70422bd + 3c22ef7 commit 90584d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@

name: Swift

on: [push]

on:
pull_request:
types: [opened, reopened]
push:
branches: ['main']
tags: [ v* ]
jobs:
build:

Expand Down
6 changes: 3 additions & 3 deletions Tests/MdocDataModel18013Tests/MdocDataModel18013Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ final class MdocDataModel18013Tests: XCTestCase {
let d1 = try XCTUnwrap(docs.first(where: {$0.docType == EuPidModel.euPidDocType}))
let d2 = try XCTUnwrap(docs.first(where: {$0.docType == IsoMdlModel.isoDocType}))
//let ns1 = d1?.issuerSigned.issuerNameSpaces!.nameSpaces.first
let pidObj = try XCTUnwrap(EuPidModel(id: UUID().uuidString, createdAt: Date(), issuerSigned: d1.issuerSigned, displayName: nil))
let pidObj = try XCTUnwrap(EuPidModel(id: UUID().uuidString, createdAt: Date(), issuerSigned: d1.issuerSigned, displayName: nil, claimDisplayNames: nil, mandatoryClaims: nil, claimValueTypes: nil))
XCTAssertEqual(pidObj.family_name, "ANDERSSON")
let mdlObj = try XCTUnwrap(IsoMdlModel(id: UUID().uuidString, createdAt: Date(), issuerSigned: d2.issuerSigned, displayName: nil))
let mdlObj = try XCTUnwrap(IsoMdlModel(id: UUID().uuidString, createdAt: Date(), issuerSigned: d2.issuerSigned, displayName: nil, claimDisplayNames: nil, mandatoryClaims: nil, claimValueTypes: nil))
XCTAssertEqual(mdlObj.familyName, "ANDERSSON")
printDisplayStrings(mdlObj.docClaims)
}
Expand Down Expand Up @@ -138,7 +138,7 @@ final class MdocDataModel18013Tests: XCTestCase {
XCTAssertEqual(doc.deviceSigned?.nameSpacesRawData.count, 1); XCTAssertEqual(doc.deviceSigned?.nameSpacesRawData[0], 160) // {} A0 empty dic
XCTAssertEqual(doc.deviceSigned?.deviceAuth.coseMacOrSignature.macAlgorithm, Cose.MacAlgorithm.hmac256)
XCTAssertEqual(doc.deviceSigned?.deviceAuth.coseMacOrSignature.signature.bytes.toHexString().uppercased(), "E99521A85AD7891B806A07F8B5388A332D92C189A7BF293EE1F543405AE6824D")
let model = try XCTUnwrap(IsoMdlModel(id: UUID().uuidString, createdAt: Date(), issuerSigned: dr.documents!.first!.issuerSigned, displayName: nil))
let model = try XCTUnwrap(IsoMdlModel(id: UUID().uuidString, createdAt: Date(), issuerSigned: dr.documents!.first!.issuerSigned, displayName: nil, claimDisplayNames: nil, mandatoryClaims: nil, claimValueTypes: nil))
XCTAssertEqual(model.familyName, "Doe")
}

Expand Down

0 comments on commit 90584d4

Please sign in to comment.