2

here is my RegisterService.h

import "UserObject.h"

@interface RegisterService : NSObject

- (void)sharedInstance;

- (void)registerWithPhoneNum:(NSString *)phoneNum password:(NSString *)password result:(void (^)(UserObject *userObject))successBlock failure:(void (^)(NSNumber *statusCode, NSString *message))failureBlock;

so how do I test the register-method with XCTest&OCMock? thanks!!

  • 1
    To test asynchronous method with XCTest, use expectations: http://stackoverflow.com/a/26901979/1271826 – Rob Mar 30 '15 at 05:07
  • 1
    Can you be a little more specific? What do you want to test? The implementation of the register method? Or some other code that should call the register method? – Erik Doernenburg Mar 31 '15 at 09:01
  • I just want to test login method ...thank you for helping !!! –  Apr 03 '15 at 16:36

0 Answers0