Unit Testing Patterns for Asynchronous Networking Communications

Thu Oct 10 2013 | Mark Struzinski

A common issue I always run into is how to test asynchronous methods, especially networking calls. I used test the result of the calls, such as the parsing of return data, because testing the entire method proved impossible. I recently read an article from the excellent objc.io publication on asynchronous testing. By combining the patterns used in this article with some refactoring, I finally have my networking code under unit tests.

Here’s what I did:

A Change in Direction

Tue May 14 2013 | Mark Struzinski

In hitting brick walls, taking road trips for work, and feeling guilty about about posting in weeks, I have reconsidered the return on investment when fully implementing logic tests.

Setting up iOS Logic Tests [Part 4]

Mon Apr 8 2013 | Mark Struzinski

This is part 4 in a multi-part series on iOS unit testing and integration testing. In the last post, we discussed setting up Core Data and the Magical Record library. This week, we’re going to set up our logic testing bundle. Let’s get started.

Orientation Changes in iOS 6

Mon Mar 11 2013 | Mark Struzinski

In a current project, I had the need to have one specific view controller present its view in landscape orientation only. Pre-iOS 6, I would have overridden the shouldAutoRotateToInterfaceOrientation method and returned UIInterfaceOrientationLandscape. In iOS 6, this method is deprecated. I began researching how orientation issues should be handled going forward, and here is the way I made my specific scenario work.

Quick Tip: TextExpander/Octopress New Code Block

Mon Feb 25 2013 | Mark Struzinski

Just a quick tip. This blog is built using Octopress. Octopress uses Jekkyl to create a static HTML site using markdown files for the content. I’ve been slowly building up some markdown specific TextExpander snippets and Keyboard Maestro macros to make things easier.

Previous Next