I have to set up test cases for an assignment. I know to use STAssertEquals for numbers but I am unsure how to test the following method that returns a string.
-(NSString *) description
{
NSLog(@"\n \n Account information for %@ \n Balance is $%g dollars \n Number of transacrions are: %d \n\n\n\n", [self owner],[self balance], [self numberOfTransactions]);
Would I use STAssertsTrue?? If so how would I apply it to the code above?
If you know the expected string result, use
STAssertEqualObjects.Since string is an
NSObject, you can useSTAssertEqualObjects, and it will delegate the check to theNSStringimplementation of object equality.