I have a class which I want to test. It uses UserDefaults in its logic. I know I have to inject a test double to test it, but I want to make it without too much effort.
If it's possible to make a temporary UserDefaults instance which is only valid during the unit testing, that will be the best. Or do I have to write a wrapper for mocking eventually?