// Path: hack020/src/com/manning/androidhacks/hack020/presenter/SplashPresenter.java
// public class SplashPresenter {
// 
//   private IConnectionStatus mConnectionStatus;
//   private ISplashView mView;
// 
//   public SplashPresenter() {
//     this(new ConnectionStatus());
//   }
// 
//   public SplashPresenter(IConnectionStatus connectionStatus) {
//     mConnectionStatus = connectionStatus;
//   }
// 
//   public void setView(ISplashView view) {
//     this.mView = view;
//   }
// 
//   protected ISplashView getView() {
//     return mView;
//   }
// 
//   public void didFinishLoading() {
//     ISplashView view = getView();
// 
//     if (mConnectionStatus.isOnline()) {
//       view.moveToMainView();
//     } else {
//       view.hideProgress();
//       view.showNoInetErrorMsg();
//     }
//   }
// }
// 
// Path: hack020/src/com/manning/androidhacks/hack020/presenter/model/IConnectionStatus.java
// public interface IConnectionStatus {
//   boolean isOnline();
// }
// 
// Path: hack020/src/com/manning/androidhacks/hack020/view/ISplashView.java
// public interface ISplashView {
// 
//   void showProgress();
//   void hideProgress();
//   void showNoInetErrorMsg();
//   void moveToMainView();
// }


import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import org.junit.Test;
import com.manning.androidhacks.hack020.presenter.SplashPresenter;
import com.manning.androidhacks.hack020.presenter.model.IConnectionStatus;
import com.manning.androidhacks.hack020.view.ISplashView;
/*******************************************************************************
 * Copyright (c) 2012 Manning
 * See the file license.txt for copying permission.
 ******************************************************************************/
package com.manning.androidhacks.hack020.presenter;




public class SplashTest {

  @Test
  public void testViewShouldShowNoInternetMsgWhenThereIsNoInternet() {
// Path: hack020/src/com/manning/androidhacks/hack020/presenter/SplashPresenter.java
// public class SplashPresenter {
// 
//   private IConnectionStatus mConnectionStatus;
//   private ISplashView mView;
// 
//   public SplashPresenter() {
//     this(new ConnectionStatus());
//   }
// 
//   public SplashPresenter(IConnectionStatus connectionStatus) {
//     mConnectionStatus = connectionStatus;
//   }
// 
//   public void setView(ISplashView view) {
//     this.mView = view;
//   }
// 
//   protected ISplashView getView() {
//     return mView;
//   }
// 
//   public void didFinishLoading() {
//     ISplashView view = getView();
// 
//     if (mConnectionStatus.isOnline()) {
//       view.moveToMainView();
//     } else {
//       view.hideProgress();
//       view.showNoInetErrorMsg();
//     }
//   }
// }
// 
// Path: hack020/src/com/manning/androidhacks/hack020/presenter/model/IConnectionStatus.java
// public interface IConnectionStatus {
//   boolean isOnline();
// }
// 
// Path: hack020/src/com/manning/androidhacks/hack020/view/ISplashView.java
// public interface ISplashView {
// 
//   void showProgress();
//   void hideProgress();
//   void showNoInetErrorMsg();
//   void moveToMainView();
// }


// Path: hack020/tests/com/manning/androidhacks/hack020/presenter/SplashTest.java
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import org.junit.Test;
import com.manning.androidhacks.hack020.presenter.SplashPresenter;
import com.manning.androidhacks.hack020.presenter.model.IConnectionStatus;
import com.manning.androidhacks.hack020.view.ISplashView;

/*******************************************************************************
 * Copyright (c) 2012 Manning
 * See the file license.txt for copying permission.
 ******************************************************************************/
package com.manning.androidhacks.hack020.presenter;




public class SplashTest {

  @Test
  public void testViewShouldShowNoInternetMsgWhenThereIsNoInternet() {
    IConnectionStatus mockedConnectionStatus = mock(IConnectionStatus.class);