Learn how to write more unit tests that work with time and verify logic works as expected around specific dates in time.
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 your unit tests. Unit testing is a great way to verify the logic works like you expect it to work.
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...
Смотрите видео Unit Testing and Dependency Injection to Time Travel - Swift TDD Code Kata (4/4) онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Paul Solt 30 Январь 2019, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,068 раз и оно понравилось 16 людям.