Unit Testing Example with OCUnit
I'm really struggling to understand unit testing. I do understand the importance of TDD, but all the examples of unit testing I read about seem to be extremely simple and trivial. For example, testing to make sure a property is set or if memory is allocated to an array. Why? If I code out ..alloc] init] , do I really need to make sure it works? I'm new to development so I'm sure I'm missing something here, especially with all the craze surrounding TDD. I think my main issue is I can't find any practical examples. Here is a method setReminderId that seems to be a good candidate for testing.