File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Tests/AWSLambdaEventsTests Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 1212//
1313//===----------------------------------------------------------------------===//
1414
15- import XCTest
15+ import Foundation
16+ import Testing
1617
1718@testable import AWSLambdaEvents
1819
19- class APIGatewayWebSocketsTests : XCTestCase {
20+ @Suite
21+ class APIGatewayWebSocketsTests {
2022 static let exampleConnectEventBody = """
2123 {
2224 " headers " : {
@@ -65,14 +67,12 @@ class APIGatewayWebSocketsTests: XCTestCase {
6567 // MARK: - Request -
6668
6769 // MARK: Decoding
68-
69- func testRequestDecodingExampleConnectRequest( ) {
70+ @Test func testRequestDecodingExampleConnectRequest( ) async throws {
7071 let data = APIGatewayWebSocketsTests . exampleConnectEventBody. data ( using: . utf8) !
71- var req : APIGatewayWebSocketRequest ?
72- XCTAssertNoThrow ( req = try JSONDecoder ( ) . decode ( APIGatewayWebSocketRequest . self, from: data) )
72+ let req = try JSONDecoder ( ) . decode ( APIGatewayWebSocketRequest . self, from: data)
7373
74- XCTAssertEqual ( req? . context. routeKey, " $connect " )
75- XCTAssertEqual ( req? . context. connectionId, " IU3kkeN4IAMCJwA= " )
76- XCTAssertNil ( req? . body)
74+ #expect ( req. context. routeKey == " $connect " )
75+ #expect ( req. context. connectionId == " IU3kkeN4IAMCJwA= " )
76+ #expect ( req. body == nil )
7777 }
7878}
You can’t perform that action at this time.
0 commit comments