I'm new with Unit Test and I've got question about it.
In my source code I have subclassed NSMutableArray
. NSMutableArray
must have implemented primitive NSMutableArray
and NSArray
methods. These methods in some case throws NSExceptions
like NSRangeExceptions
.
The question is: "When I make unit tests for this primitive methods should I write case for NSExceptions
?
Example:
//array with 3 objects
STAssertThrows([array insertObject:object atIndex:8], @"");
- Is this correct?
- Is this neccesary?