package kr.co.zumo.app.lifeplus.view.fragment.signup;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;

import java.util.ArrayList;

import kr.co.zumo.app.R;
import kr.co.zumo.app.lifeplus.bean.SignUpBenefitBean;

/**
 * BenefitHolderTest
 * <pre>
 * </pre>
 *
 * @author 민효동
 * @version 1.0
 * @history 민효동   [2018. 9. 12.]   [최초 작성]
 * @since 2018. 9. 12.
 */
@RunWith(RobolectricTestRunner.class)
public class BenefitHolderTest {

  @Test
  public void draw() {
    SignUpBenefitBean bean = new SignUpBenefitBean("3 번째 텍스트", R.drawable.circle_full, "benefit text1", "benefit text2");
    SignUpBenefitBean bean2 = new SignUpBenefitBean("3 번째 텍스트", R.drawable.circle_full, "benefit text1", "benefit text2");
    SignUpBenefitBean bean3 = new SignUpBenefitBean("3 번째 텍스트", R.drawable.circle_full, "benefit text1", "benefit text2");

    ArrayList<SignUpBenefitBean> list = new ArrayList<>();

    list.add(bean);
    list.add(bean2);
    list.add(bean3);

//    SignUpFragmentPresenter presenter = Mockito.mock(SignUpFragmentPresenter.class);
//    SignUpItem item = spy(new SignUpItem(SignUpItem.SIGN_UP_BENEFIT, SignUpItem.ALIGN_CENTER, new SignUpBenefitListBean(list).toJson()));
//    when(presenter.getItem(any(Integer.class))).thenReturn(item);
//    SuperModel.getInstance().setFragmentPresenter(presenter);
//
//    View view = mock(View.class);
//    when(view.findViewById(any(Integer.class))).thenReturn(mock(SignUpBenefitCustomView.class));
//
//    BenefitHolder holder = new BenefitHolder(view);
//    holder.draw(item);
//
//    verify(view, new Times(list.size())).findViewById(any(Integer.class));

  }
}