I am a newbie on testing and so I am stumbling about testing internal functionality on some code parts. How to test ONLY the privateParseAndCheck and/or privateFurtherProcessing functionality with different input, but I dont want it as public functions?
-(BOOL) publicFunction() { //some stuff with network NSError* error; NSData* data = load(&error); //now I got data and parse and check BOOL result = privateParseAndCheck(data, error, ...);
if( result ) { privateFurtherProcessing(); } return result; }
Is re-writing the code the solution? I am also interested in some experiences with the tips/solutions on Xcode Server.
Aucun commentaire:
Enregistrer un commentaire