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 UnitTests | |
class ExampleTests: XCTestCase { | |
var viewControllerUnderTest: ViewController! | |
override func setUp() { | |
super.setUp() |
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 UIKit | |
import XCTest | |
import MapKit | |
class ExampleTests: XCTestCase { | |
//declaring the ViewController under test as an implicitly unwrapped optional | |
var viewControllerUnderTest : ViewController! | |
override func setUp() { |
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
------------------------------------------------------------------------------------------------------------------------------ | |
DESCRIPTION: | |
Notes for deploying TileStream on an AWS EC2 Ubuntu 12.04.2 Server for development. Includes workflow for creating | |
a local tile cache with TileMill, connecting to your Ubuntu EC2 server via SSH using Mac OSX Terminal, and uploading | |
your tiles (.mbtiles) to your TileStream server. | |
REFERENCES: | |
TileStream git repo: https://github.com/mapbox/tilestream | |
----------------------------------------------------------------------------------------------------------------------------- |
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 testSUT_PassesDataToTargetViewController() { | |
// declare the storyboard, source view controller, and target view controller | |
let storyboard: UIStoryboard = UIStoryboard(name: "Main_iPhone", bundle: nil) | |
let callingViewController = storyboard.instantiateViewControllerWithIdentifier("PlaceListViewController") as! PlaceListViewController | |
let targetViewController = storyboard.instantiateViewControllerWithIdentifier("PlaceDetailsViewController") as! PlaceDetailsViewController | |
// fetch the segue from story board | |
let targetSegue: UIStoryboardSegue = UIStoryboardSegue(identifier: callingViewController.placeDetailsViewControllerSegue, source: callingViewController, destination: targetViewController) | |
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
// example of unit test for model initialization | |
// TEST CODE | |
import XCTest | |
@testable import yourmodule | |
class PlaceTest: 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
import XCTest | |
@testable import YourProjectModule | |
class ViewControllerTest: XCTestCase { | |
var systemUnderTest: ViewController! | |
override func setUp() { | |
super.setUp() |
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
{ | |
"Version": "2008-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowPublicRead", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": "s3:GetObject", |
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
See Profiles Configured on Machine: | |
$ vim ~/.aws/config | |
$ vim ~/.aws/credentials | |
Create profile | |
$ aws configure --profile YourProfileName1 | |
$ aws configure --profile YourProfileName2 |
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
// Example of an asynchronous unit test | |
func testUserLogin() { | |
let readyExpectation = expectationWithDescription("ready") | |
User.loginWithUsername("kris@bla.org", password: "blah") { (isSuccess) -> Void in | |
let expectedLoginSuccessStatus = true |
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
// | |
// TEST CODE | |
import XCTest | |
@testable import to | |
class JSONReaderTest: XCTestCase { | |