OSDN Git Service

処理を簡略化
[kcd/KCD.git] / KCDTests / GuardEscapeTest.swift
index 54c70ea..a5403e9 100644 (file)
@@ -94,10 +94,10 @@ class GuardEscapeTest: XCTestCase {
             
             guard let json = JSON(rawValue: rawValue) else { return XCTFail("json is nil") }
             let param = Parameter(["Test": "Test"])
-            let resultApi = APIResponse(api: BattleAPI.battleResult.rawValue, parameter: param, json: json)
+            let resultApi = APIResponse(api: API(endpointPath: Endpoint.battleResult.rawValue), parameter: param, json: json)
             GuardShelterCommand(apiResponse: resultApi).execute()
             
-            let goBackApi = APIResponse(api: GuardEscapeAPI.goback.rawValue, parameter: param, json: json)
+            let goBackApi = APIResponse(api: API(endpointPath: Endpoint.goback.rawValue), parameter: param, json: json)
             GuardShelterCommand(apiResponse: goBackApi).execute()
         }
         
@@ -167,10 +167,10 @@ class GuardEscapeTest: XCTestCase {
             
             guard let json = JSON(rawValue: rawValue) else { return XCTFail("json is nil") }
             let param = Parameter(["Test": "Test"])
-            let resultApi = APIResponse(api: BattleAPI.battleResult.rawValue, parameter: param, json: json)
+            let resultApi = APIResponse(api: API(endpointPath: Endpoint.battleResult.rawValue), parameter: param, json: json)
             GuardShelterCommand(apiResponse: resultApi).execute()
             
-            let goBackApi = APIResponse(api: GuardEscapeAPI.gobakAlone.rawValue, parameter: param, json: json)
+            let goBackApi = APIResponse(api: API(endpointPath: Endpoint.gobakAlone.rawValue), parameter: param, json: json)
             GuardShelterCommand(apiResponse: goBackApi).execute()
         }