Files
ccn/Packages/Persistence/Tests/Cases/Public/Enumerations/TLSTests.swift
T

29 lines
554 B
Swift
Raw Normal View History

import NIOSSL
import Testing
@testable import Persistence
@Suite("TLS enumeration")
struct TLSTests {
// MARK: Properties tests
@Test
func `off has no TLS configuration`() {
#expect(TLS.off.tlsConfiguration == nil)
}
@Test(arguments: [
TLS.prefer,
TLS.require
])
func `maps to the default client configuration`(
for tls: TLS
) throws {
let configuration = try #require(tls.tlsConfiguration)
#expect(configuration.bestEffortEquals(.makeClientConfiguration()))
}
}