mirror of
https://github.com/maxgoedjen/secretive.git
synced 2024-11-22 05:27:28 +00:00
Add test
This commit is contained in:
parent
f214da98a4
commit
104199cf53
@ -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 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)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user