April 2015
Intermediate to advanced
556 pages
17h 47m
English
Next, you will write tests for ScheduleFetcher. To get started, create a new Swift source file in the RanchForecastTests called ScheduleFetcherTests.swift. In the file, add a new class ScheduleFetcherTests, a subclass of XCTestCase.
import Foundationimport XCTest import RanchForecast class ScheduleFetcherTests: XCTestCase { }
Before you can write any tests against ScheduleFetcher,
you need to make sure that the class itself is visible
from the RanchForecastTests target.
You already imported the RanchForecast target
into ScheduleFetcherTests.swift,
but you still need to mark the class and its initializer public.
Edit ScheduleFetcher.swift as follows:
public class ScheduleFetcher { enum ...