2020-02-28 19:04:53 +01:00
|
|
|
//
|
|
|
|
|
// PasswordGeneratorFlavorTest.swift
|
|
|
|
|
// passKitTests
|
|
|
|
|
//
|
|
|
|
|
// Created by Danny Moesch on 28.11.18.
|
|
|
|
|
// Copyright © 2018 Bob Sun. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
import XCTest
|
|
|
|
|
|
|
|
|
|
@testable import passKit
|
|
|
|
|
|
2024-11-24 13:14:38 +01:00
|
|
|
final class PasswordGeneratorFlavorTest: XCTestCase {
|
2020-02-28 19:04:53 +01:00
|
|
|
func testLengthLimits() {
|
|
|
|
|
// Ensure properly chosen length limits. So this check no longer needs to be performed in the code.
|
2020-06-28 21:25:40 +02:00
|
|
|
PasswordGeneratorFlavor.allCases.map(\.lengthLimits).forEach {
|
2020-02-28 19:04:53 +01:00
|
|
|
XCTAssertLessThanOrEqual($0.min, $0.max)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|