Giter Club home page Giter Club logo

test-driven-ios-development-with-swift-3's Introduction

Test-Driven iOS Development with Swift 3

This is the code repository for Test-Driven iOS Development with Swift 3, published by Packt. It contains all the supporting project files necessary to work through the book from start to finish.

Instructions and Navigations

All of the code is organized into folders. Each folder starts with a number followed by the application name. For example, Chapter02.

The code will look like the following:

func makeHeadline(string: String) -> String {
 return "This Is A Test Headline"
}

The following hardware and software is needed to follow the code examples in the book: Mac with Sierra (MAC OS 10.12) Xcode 8

Suggestions and Feedback

Click here if you have any feedback or suggestions.

test-driven-ios-development-with-swift-3's People

Contributors

packt-itservice avatar packtutkarshr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

test-driven-ios-development-with-swift-3's Issues

Bug in chapter 4 in "test_Save_UsesGeocoderToGetCoordinateFromAddress"

In chapter 4 ImplementingInputViewController the test from the book
"test_Save_UsesGeocoderToGetCoordinateFromAddress" is failing.
The problem is the dateFormatter.dateFormat . In the test it has the timestamp and it can convert it to string correctly but
in the viewController it can't convert to the correct timestamp/date from the string due to missing information in the string.
What i did to make the test pass was to add information about the hour, minute, second and time zone. I did this by changing
this line the dateFormat string to "MM/dd/yyyy HH:mm:ssZZZZZ" in both the test and the viewController.
Hope this helps someone who wondered like me why it fails :)

Chapter 6 exercise

How to check at the end of Chapter 6 that tableview reloaded?
I try:

 func test_ItemListViewController_ReloaddataOnViewWillAppear() {
        let mockTableView = MockTableView()

        sut.tableView = mockTableView
        
        sut.beginAppearanceTransition(true, animated: true)
        sut.endAppearanceTransition()
        
        XCTAssertTrue(mockTableView.tableViewReloaded)
    }
extension ItemListViewControllerTest {
    class MockTableView: UITableView {
        var tableViewReloaded = false
        
        override func reloadData() {
            tableViewReloaded = true
        }
     }
}

but it not works.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.