Created
July 24, 2021 12:16
-
-
Save ykpoh/b63bcb837013e597c9230468adb9bbad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
@testable import SpaceXLaunch | |
import XCTest | |
extension XCTest { | |
func givenLaunches(count: Int) -> [Launch] { | |
return (1 ... count).map { i in | |
return Launch(id: "id_\(i)", name: "name_\(i)", details: "details_\(i)", date_utc: Date(), upcoming: true, success: true, rocket: "rocket_\(i)") | |
} | |
} | |
func givenURLs(count: Int) -> [URL] { | |
return (1 ... count).map { _ in | |
return URL(string: "https://farm5.staticflickr.com/4711/40126461411_aabc643fd8_b.jpg")! | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment