title: Swift Mocking Unit/ UI Testing
body: <p>Basically I have a fairly large project built in MVP for which I need to incorporate UI and Unit testing wherever applicable.
  The project has a large number of API calls, the client has requested that API calls be <strong>mocked</strong> within the App (Dummy data). So basically I need two targets in the App, one most likely the Production and the other just for testing where it does not contact the server and just mocks the requests and sends static pre defined Json data to the response handlers for the app to function with. The solution that I initially thought of was creating a global bool value and depending on the project target selected (Production (Bool value = False),Testing (Bool value = True)) so wherever a request is being made in the code, it would check this bool value and then choose to go with either the Testing Dummy Request (which returns static pre defined Json DATA to the response handler) or Live API request. But this kinda makes the code messy.
  I'm fairly new to Unit/UI testing so Id appreciate any suggestions.
  Thanks in advance :).</p>