mvm_core_ui/MVMCoreUITests/TestUtils.swift

20 lines
534 B
Swift

//
// TestUtils.swift
// MVMCoreUITests
//
// Created by Kyle Hedden on 5/16/24.
// Copyright © 2024 Verizon Wireless. All rights reserved.
//
import Foundation
import XCTest
extension XCTestCase {
func getFileData(_ fileName: String, type: String = "json") throws -> Data {
guard let resourcePath = Bundle(identifier: "com.vzw.MVMCoreUITests")?.path(forResource: fileName, ofType: type) else { throw TestError.resoureNotFound }
return try Data(contentsOf: URL(fileURLWithPath: resourcePath))
}
}