Can we write GHunit test for delegate methods ? I have a delegate method and I am trying to write GHUnit Test for that delegate methods.
Asked
Active
Viewed 242 times
1 Answers
0
It depends on how you want to test the delegate method. If you want to test that a delegate method was called in a certain scenario, then you can use mock objects for that. OCMock is the typical framework on iOS and Mac OS for mocking. The last time I checked it played nicely with GHUnit. I'm using SenTest exclusively now, so I cannot say authoritatively.
If you want to test the functionality of a delegate method, nothing prevents you from calling the delegate method directly from within the test case.

FluffulousChimp
- 9,157
- 3
- 35
- 42