I have a class that stores user preferences. When the class is created it retrieves data from the UserDefault file on iOS using the cocos2d::UserDefault functionality.
UserPref::ReadFromUserDefault() {
_mx_username = cocos2d::UserDefault::getInstance()->getStringForKey("mx_username", "");
}
Is it possible to get cocos2d::UserDefault to point to a fake XML file of my own creation for the purposes of unit testing my class?
Thanks! GCB
Aucun commentaire:
Enregistrer un commentaire