package kr.co.zumo.app.lifeplus.supervisor;

import android.support.annotation.IdRes;

import kr.co.zumo.app.lifeplus.activity.MainActivity;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import static org.mockito.Mockito.mock;

public class ScreenChangerHelperTest {

//  @Mock
  ScreenChangerHelper screenChangerHelper;

  @Before
  public void before() {
//    MockitoAnnotations.initMocks(this);

    screenChangerHelper = ScreenChangerHelper.getInstance();
  }

  @Test
  public void getContainerId() {
    @IdRes Integer id = 1;
    screenChangerHelper.setContainerId(id);

    Assert.assertTrue(screenChangerHelper.getContainerId() == id);
  }

  @Test
  public void setContainerId() {
    @IdRes Integer id = 11;
    screenChangerHelper.setContainerId(id);

    Assert.assertTrue(screenChangerHelper.getContainerId() == id);
  }

  @Test
  public void getFragmentActivity() {
    MainActivity activity = mock(MainActivity.class);
    screenChangerHelper.setAppCompatActivity(activity);

    Assert.assertEquals(activity, screenChangerHelper.getAppCompatActivity());
  }

  @Test
  public void setFragmentActivity() {
    //
  }
}