Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgoedjen committed Mar 22, 2020
1 parent f214da9 commit 104199c
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions SecretKitTests/AnySecretTests.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
//
// AnySecretTests.swift
// SecretKitTests
//
// Created by Max Goedjen on 3/21/20.
// Copyright © 2020 Max Goedjen. All rights reserved.
//

import Foundation
import XCTest
@testable import SecretKit

class AnySecretTests: XCTestCase {

func testEraser() {
let secret = SmartCard.Secret(id: UUID().uuidString.data(using: .utf8)!, name: "Name", algorithm: .ellipticCurve, keySize: 256, publicKey: UUID().uuidString.data(using: .utf8)!)
let erased = AnySecret(secret)
XCTAssert(erased.id == secret.id as AnyHashable)
XCTAssert(erased.name == secret.name)
XCTAssert(erased.algorithm == secret.algorithm)
XCTAssert(erased.keySize == secret.keySize)
XCTAssert(erased.publicKey == secret.publicKey)
}

}

0 comments on commit 104199c

Please sign in to comment.