I have two XCTestCase subclasses,
@interface SessionTest : XCTestCase
@interface UserTest : XCTestCase
In SessionTest
class I am having helper method -(BOOL)Login;
I want to use this method in UserTest
class, can someone tell me how to achieve this functionality.
Thanks.
You can create the third class:
@interface TestHelper : NSObject
implement -(BOOL)Login
as method of TestHelper
and use it from SessionTest
and UserTest
.
As possible solution you can inherit UserTest
from SessionTest
:
@interface UserTest : SessionTest