OCmock and MKReverseGeocoder
Posted
by user315374
on Stack Overflow
See other posts from Stack Overflow
or by user315374
Published on 2010-05-04T15:34:00Z
Indexed on
2010/05/07
18:28 UTC
Read the original article
Hit count: 475
ocmock
|mkreversegeocoder
Hi,
I would like to test a method that uses reverse Geocoding. What i would like to do is :
set the geocoder as a property of my controller
create the geocoder in the init method
call the geocoder in the method i want to test
replace the geocoder with a mock in my test
The problem is that the MKReverseGeocoder coordinate property is read only, i can only set it in the constructor method :
[[MKReverseGeocoder alloc] initWithCoordinate:coord]
And of course the coordinates are only available in the method i want to test..
Does anyone knows how i could mock the MKReverseGeocoder class ?
Thanks in advance, Vincent.
© Stack Overflow or respective owner