@@ -0,0 +1,1460 @@
+package org.adaptlab.chpir.android.survey.QuestionFragments;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNotNull;%0Aimport static org.mockito.Mockito.doNothing;%0Aimport static org.mockito.Mockito.spy;%0A%0Aimport org.adaptlab.chpir.android.survey.SurveyActivity;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.robolectric.Robolectric;%0Aimport org.robolectric.RobolectricTestRunner;%0A%0Aimport android.view.ViewGroup;%0Aimport android.widget.LinearLayout;%0A%0A@RunWith(RobolectricTestRunner.class)%0Apublic class InstructionsQuestionFragmentTest extends QuestionFragmentBaseTest %7B%0A%09private SurveyActivity mActivity;%0A%09private InstructionsQuestionFragment mFragment;%0A%09@Override%0A%09public void setUp() throws Exception %7B%0A%09%09mActivity = Robolectric.buildActivity(SurveyActivity.class).create().get();%0A%09%09mFragment = spy(new InstructionsQuestionFragment());%0A%09%09doNothing().when(mFragment).init();%0A%09%09setBundleArgs(mFragment);%0A%09%09startFragment(mActivity, mFragment);%0A%09%7D%0A%09%0A%09@Test%0A%09public void shouldNotBeNull() throws Exception %7B%0A%09%09assertNotNull(mFragment);%0A%09%7D%0A%09%0A%09@Test%0A%09public void createQuestionComponentShouldAddView() throws Exception %7B%0A%09%09ViewGroup mComponent = new LinearLayout(Robolectric.application);%0A%09%09mFragment.createQuestionComponent(mComponent);%0A%09%09assertEquals(mComponent.getChildCount(), 0);%0A%09%7D%0A%09%0A%09@Test%0A%09public void serializeShouldReturnEmptyString() throws Exception %7B%0A%09%09assertEquals(mFragment.serialize(), %22%22);%0A%09%7D%0A%09%0A%7D%0A

instructions question fragment unit tests