@@ -7,7 +7,7 @@ import Mocker
77final class AlphaVantageServiceTests : XCTestCase {
88 private let apiKey = " whatever "
99
10- func testQuote( ) async throws {
10+ func testQuote( ) async {
1111 // Given
1212 let service = givenService ( )
1313 let symbol = " VWCE.DEX "
@@ -24,13 +24,13 @@ final class AlphaVantageServiceTests: XCTestCase {
2424 given ( response: . quote, for: " https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol= \( symbol) &apikey= \( apiKey) " )
2525
2626 // When
27- let result = try await service. quote ( for: symbol)
27+ let result = await service. quote ( for: symbol)
2828
2929 // Then
3030 assertSuccess ( result, expectedValue: expectedQuote)
3131 }
3232
33- func testCurrencyExchangeRate( ) async throws {
33+ func testCurrencyExchangeRate( ) async {
3434 // Given
3535 let service = givenService ( )
3636 let base = " EUR "
@@ -47,13 +47,13 @@ final class AlphaVantageServiceTests: XCTestCase {
4747 given ( response: . currencyExchangeRate, for: " https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE&from_currency= \( base) &to_currency= \( target) &apikey= \( apiKey) " )
4848
4949 // When
50- let result = try await service. currencyExchangeRate ( from: base, to: target)
50+ let result = await service. currencyExchangeRate ( from: base, to: target)
5151
5252 // Then
5353 assertSuccess ( result, expectedValue: expectedRate)
5454 }
5555
56- func testSymbolSearchSuccess( ) async throws {
56+ func testSymbolSearchSuccess( ) async {
5757 // Given
5858 let keyword = " vwce "
5959 let expectedSymbol = Symbol ( symbol: " VWCE.DEX " ,
@@ -69,21 +69,21 @@ final class AlphaVantageServiceTests: XCTestCase {
6969 given ( response: . symbolSearchSuccess, for: " https://www.alphavantage.co/query?function=SYMBOL_SEARCH&keywords= \( keyword) &apikey= \( apiKey) " )
7070
7171 // When
72- let result = try await service. symbolSearch ( keywords: keyword)
72+ let result = await service. symbolSearch ( keywords: keyword)
7373
7474 // Then
7575 assertSuccess ( result, expectedValue: [ expectedSymbol] )
7676 }
7777
78- func testSymbolSearchFailure( ) async throws {
78+ func testSymbolSearchFailure( ) async {
7979 // Given
8080 let expectedError = AlphaVantageAPIError ( message: " Invalid API call. " )
8181 let keyword = " whatever "
8282 let service = givenService ( )
8383 given ( response: . symbolSearchFailure, for: " https://www.alphavantage.co/query?function=SYMBOL_SEARCH&keywords= \( keyword) &apikey= \( apiKey) " )
8484
8585 // When
86- let result = try await service. symbolSearch ( keywords: keyword)
86+ let result = await service. symbolSearch ( keywords: keyword)
8787
8888 // Then
8989 switch result {
0 commit comments