Core Data and Unit Testing haven't always been the best of friends. Like two members of the same friend group who don't really know each other but really like their UIKit friend…
#testing
13 posts with this tag
Firefighters are portrayed, quite rightly, in our society as heroes. They courageous run into dangerous situations and save people. However, let's think about why we need firefighters…
Most iOS apps will have a networking component, in previous posts I've written about treating the network call and parsing as one task [https://williamboles.com/networking-with-nsoperation-as-your-wingman/] or how to cut down on unneeded network calls by coalescing [https://williamboles.com/removing…
When I first created ConvenientFileManager [https://github.com/wibosco/ConvenientFileManager] I didn't add a unit testing target - what can I say, I was young(er) and foolish. Recently I decided to rectify this grievous error and added a unit testing target. After writing the tests I pushed them to…
Cohesion is important for your application. Each unit of work should have a clear purpose and clear area of responsibility, this is known as the Single Responsibility Principle [https://en.wikipedia.org/wiki/Single_responsibility_principle] (SRP). If you find that you are working on a method/class t…
Dependence injection (DI) is a useful technique to have in your unit testing toolbox. It's were we take implicit dependencies that our method/class rely on and make those dependencies explicit. It's especially useful when writing unit tests as it allows us to avoid using the black magic of method sw…