Below are the changes I have made to project in order to achieve exercise GOALS

In Appdelegate I have following changes

  • added Navigationbar
  • Setup ‘window’ properly

Then I have made few changes Entities.

  • Added a static method to get URLREQUEST
  • function to save ‘StationTrain’ to defaults

Then I moved to ‘SearchTrainInteractor’ and made the following changes

  • removed amlofire.
  • Implemented ‘URLSession’.
  • Managed multiple requests in ‘proceesTrainListforDestinationCheck’.
  • Segregated code
  • Added favourite functionality.

In Presenter, Protocols, Router .

  • only removed boilerplate code to with generic functions.

After that I code the view part in ‘SearchTrainViewController.swift’

  • Changed to cell handling.
  • handled Favourite functionality via closure
  • Changed view component to run on main thread.

Lastly in ‘SearchTrainPresenterTests’ added few test

Newly implemented tasks
  • Implemented the network adapter layer.
  • Wrote test cases for interactor