diff SimoleonTests/SimoleonTests.swift @ 173:ad8c6567539d

restart project
author Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com>
date Tue, 26 Oct 2021 13:09:17 +0200
parents 3913aff613e8
children 5a9430fd6b4d
line wrap: on
line diff
--- a/SimoleonTests/SimoleonTests.swift	Tue Oct 12 17:14:05 2021 +0200
+++ b/SimoleonTests/SimoleonTests.swift	Tue Oct 26 13:09:17 2021 +0200
@@ -2,7 +2,7 @@
 //  SimoleonTests.swift
 //  SimoleonTests
 //
-//  Created by Dennis Concepción Martín on 27/8/21.
+//  Created by Dennis Concepción Martín on 26/10/21.
 //
 
 import XCTest
@@ -17,47 +17,15 @@
     override func tearDownWithError() throws {
         // Put teardown code here. This method is called after the invocation of each test method in the class.
     }
-    
-    func testGetAllCurrencies() throws {
-        // Create test cases
-        let testCases = [1: ["USD/GBP", "EUR/AED"], 2: ["USD/GBP", "USD/EUR"]]
-        let expectedResults = [1: ["USD", "EUR"], 2: ["USD"]]
-        
-        // Test
-        let currencySelector = CurrencySelector(currencyConversion: CurrencyConversion())
-        for testCaseNumber in testCases.keys {
-            print("Testing case: \(testCaseNumber)")
-            let mockData = testCases[testCaseNumber]!
-            let allCurrencies = currencySelector.get(currencyType: .all, from: mockData)
-            
-            // Assert
-            XCTAssertEqual(allCurrencies, expectedResults[testCaseNumber])
-        }
-    }
-    
-    func testGetCompatibleCurrencies() throws {
-        // Create test cases
-        let testCases = [1: ["USD/GBP", "EUR/AED"], 2: ["USD/GBP", "USD/EUR"], 3: ["EUR/AED"]]
-        let expectedResults = [1: ["GBP"], 2: ["GBP", "EUR"], 3: []]
-        
-        // Test
-        let currencySelector = CurrencySelector(currencyConversion: CurrencyConversion())
-        for testCaseNumber in testCases.keys {
-            print("Testing case: \(testCaseNumber)")
-            let mockData = testCases[testCaseNumber]!
-            let compatibleCurrencies =
-                currencySelector.get(
-                    currencyType: .compatible(with: currencySelector.currencyConversion.baseSymbol), from: mockData
-                )
-            
-            // Assert
-            XCTAssertEqual(compatibleCurrencies, expectedResults[testCaseNumber])
-        }
+
+    func testExample() throws {
+        // This is an example of a functional test case.
+        // Use XCTAssert and related functions to verify your tests produce the correct results.
     }
 
     func testPerformanceExample() throws {
         // This is an example of a performance test case.
-        measure {
+        self.measure {
             // Put the code you want to measure the time of here.
         }
     }