Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
swift-urlqueryitem-coder Tests URLQueryItemCoderTests End to End URLQueryItemCoderEndToEndTests.swift
1.3 kB · 41 lines
Swift
at main
123456789101112131415161718192021222324252627282930313233343536373839404142//// URLQueryItemCoderEndToEndTests.swift// URLQueryItemCoder//// Created by Kyle Hughes on 2/23/23.//
#if canImport(Combine)import XCTest
@testable import URLQueryItemCoder
final class URLQueryItemCoderEndToEndTests: AbstractEndToEndTests<URLQueryItemEncoder, URLQueryItemDecoder> { // MARK: AbstractEndToEndTests Implementation override func decoder(using strategies: DecodingStrategies = .default) -> URLQueryItemDecoder { URLQueryItemDecoder(strategies: strategies) } override func encoder(using strategies: EncodingStrategies = .default) -> URLQueryItemEncoder { URLQueryItemEncoder(strategies: strategies) }}
// MARK: - Output Formatting Tests
extension URLQueryItemCoderEndToEndTests { // MARK: Keyed Value Sorted Keys Tests public func test_keyedValue_sortedKeys() throws { try XCTSkipIf(Self.isAbstractTestCase) let inputValue = CodableTestTypes.KeyEncodingStrategy.default let encodedValue = try URLQueryItemEncoder(outputFormatting: .sortedKeys).encode(inputValue) let decodedValue = try URLQueryItemDecoder().decode(type(of: inputValue), from: encodedValue) XCTAssertEqual(decodedValue, inputValue) }}#endif