title: unit testing VIPER protocols
body: <p>After reading several posts and articles about this issue I'm still confused about how to test a method in a VIPER architecture (for example with Swift).</p>
  
  <p>If I had this code:</p>
  
  <p>Presenter class</p>
  
  <pre><code>protocol InteractorToPresenterProtocol: class {
  
      func showInfo(info: Info)
  }
  
  class Presenter {
  
      private var interactor: PresenterToInteractorProtocol?
  
      init() {}
  
      func makeSomeStuffInPresenter() {
  
          // make some stuff 
          ...
          interactor?.makeSomeStuffInInteractor()
      }
  }
  
  extension Presenter : InteractorToPresenterProtocol {
  
      func showInfo(info: Info) {
  
         print(info)
      }    
  }
  </code></pre>
  
  <p>Interactor class:</p>
  
  <pre><code>protocol PresenterToInteractorProtocol: class {
  
      func makeSomeStuffInInteractor()
  }
  
  class Interactor {
  
      private var presenter: InteractorToPresenterProtocol?
  
      init() {}
  }
  
  extension Interactor : PresenterToInteractorProtocol {
  
      func makeSomeStuffInInteractor() {
  
         // make some stuff 
         ...
         presenter?.showInfo(info)
      }    
  }
  </code></pre>
  
  <p>How should I test makeSomeStuffInPresenter method?</p>