Part 1/4: Learn how to write Swift code with Test Driven Development (TDD). This 4 part series is based on my guest lecture that I gave for Lambda School students in the iOS Development track.
This video series was not sponsored or endorsed by Lambda School.
1. Learn about the 3 Laws of TDD
2. Learn about Red, Green, Refactor
3. Learn about Arrange, Act, Assert for test formatting
4. See the design of the TrialPeriod
5. Learn how tests work in Xcode 10
Code: https://github.com/PaulSolt/TestingTi...
Lambda School iOS: https://lambdaschool.com/courses/cs/ios/
You'll learn how to write code using a TimeTraveler based on John Sundell's article on unit testing time (Link below).
By following along and writing the code, you can turn this exercise into a Code Kata, which you can practice over again to reinforce the concepts for testing time related code.
The code uses dependency injection to provide a new date generating function, so that we can time travel in the unit tests.
Video Links
Part 1: • Xcode Unit Testing Time Introduction ...
Part 2: • Your First Unit Test in Xcode (XCTest...
Part 3: • Test Driven Development with Unit Tes...
Part 4: • Unit Testing and Dependency Injection...
Source Code
Part 1: https://github.com/PaulSolt/TestingTi...
Part 2: https://github.com/PaulSolt/TestingTi...
Part 3: https://github.com/PaulSolt/TestingTi...
Part 4: https://github.com/PaulSolt/TestingTi...
Github: https://github.com/PaulSolt/TestingTi...
3 Laws of TDD: http://butunclebob.com/ArticleS.Uncle...
Bowling Game Kata: https://qualitycoding.org/tdd-kata/
--
Learn how to make iPhone apps from scratch using Swift, Xcode, and iOS. I teach how to use Storyboard, Auto Layout, UI Design, app ideas, and app usability.
Easy Tutorials: http://blog.SuperEasyApps.com
Follow Paul: / paulsolt
Email: [email protected]
Click here to Subscribe: http://www.youtube.com/subscription_c...