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
We changed it from @HOME.URL@ to @HOME_URL@ | |
/** | |
* Useful build-time constants. | |
* This file is generated as part of the production release process, | |
* overriding defaults configured for use in a development environment. | |
* | |
* Any local changes to this file are therefore subject to being overwritten | |
* by use of the ant build process, and may not survive a source check-in for | |
* very long. |
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 org.apache.tools.ant.filters.ReplaceTokens | |
apply plugin: 'android-sdk-manager' | |
apply plugin: 'android' | |
task generateConfigFile(type: Copy) { | |
// Build config file from environment variables | |
// this task doesn't get executed automatically. You have to run it explicitly. (Jenkins does this) | |
from 'build.config/Config.java' | |
into 'iTriageLib/src/com/healthagen/iTriage' |
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 XCTest | |
class ViewControllerTests: XCTestCase { | |
} |
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
func testControllerHasTableView() { | |
guard let controller = UIStoryboard(name: "Main", bundle: Bundle(for: ViewController.self)).instantiateInitialViewController() as? ViewController else { | |
return XCTFail("Could not instantiate ViewController from main storyboard") | |
} | |
controller.loadViewIfNeeded() | |
XCTAssertNotNil(controller.tableView, | |
"Controller should have a tableview") | |
} |
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
func testTableViewDataSourceIsKittenDataSource() { | |
guard let controller = UIStoryboard(name: "Main", bundle: Bundle(for: ViewController.self)).instantiateInitialViewController() as? ViewController else { | |
return XCTFail("Could not instantiate ViewController from main storyboard") | |
} | |
controller.loadViewIfNeeded() | |
XCTAssertTrue(controller.tableView.dataSource is KittenDataSource, | |
"TableView's data source should be a KittenDataSource") | |
} |
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 XCTest | |
@testable import KittenAdoptR | |
class KittenTests: XCTestCase { | |
func testKittenHasAName() { | |
let kitten = Kitten(name: "Uncle Fester") | |
XCTAssertEqual(kitten.name, "Uncle Fester", | |
"Kitten name should be set in initializer") | |
} |
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 XCTest | |
@testable import KittenAdoptR | |
class KittenDataSourceTests: XCTestCase { | |
var dataSource: KittenDataSource! | |
override func setUp() { | |
super.setUp() | |
dataSource = KittenDataSource() |
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
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
return kittens.count | |
} | |
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) | |
cell.textLabel?.text = kittens[indexPath.row].name | |
return cell | |
} |
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
func testCellForRow() { | |
let tableView = UITableView() | |
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "Cell") | |
let cell = dataSource.tableView(tableView, cellForRowAt: IndexPath(row: 0, section: 0)) | |
XCTAssertEqual(cell.textLabel?.text, "Kitten: 0", | |
"The first cell should display name of first kitten") | |
} |
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
func testHasZeroSectionsWhenZeroKittens() { | |
dataSource.kittens = [] | |
let tableView = UITableView() | |
XCTAssertEqual(dataSource.numberOfSections(in: tableView), 0, | |
"TableView should have zero sections when no kittens are present") | |
} |
OlderNewer