@@ -0,0 +1,2069 @@
+package ca.six.aut;%0A%0Aimport android.content.Intent;%0Aimport android.os.Bundle;%0Aimport android.widget.Button;%0Aimport android.widget.EditText;%0Aimport android.widget.TextView;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.robolectric.Robolectric;%0Aimport org.robolectric.RobolectricTestRunner;%0Aimport org.robolectric.annotation.Config;%0Aimport org.robolectric.shadows.ShadowApplication;%0A%0Aimport java.util.List;%0Aimport java.util.Set;%0A%0Aimport cn.six.aut.BuildConfig;%0Aimport cn.six.aut.R;%0Aimport cn.six.jump.JumpFromActivity;%0Aimport cn.six.jump.JumpToActivity;%0A%0Aimport static junit.framework.Assert.assertEquals;%0A%0A/**%0A * Created by songzhw on 2016-09-27%0A */%0A@RunWith(RobolectricTestRunner.class)  // %E4%B8%8D%E7%94%A8%E8%BF%99%E4%B8%AA%EF%BC%8C %E5%B0%B1%E5%9C%A8buildActivity%E6%97%B6%E4%BC%9A%E9%94%99%E7%9A%84%0A@Config(constants = BuildConfig.class) // %E4%BF%AE%E5%A4%8D%E8%AF%B4%E6%89%BE%E4%B8%8D%E5%88%B0AndroidManifest%E7%9A%84warning%0Apublic class JumpFromTest %7B%0A    public JumpFromActivity fromActivity;%0A    public Button btnShow, btnJump;%0A    public TextView tv;%0A    public EditText et;%0A%0A    @Before%0A    public void setUp()%7B%0A        fromActivity = Robolectric.setupActivity(JumpFromActivity.class);%0A        btnShow = (Button) fromActivity.findViewById(R.id.btn_jumpform_reshow);%0A        btnJump = (Button) fromActivity.findViewById(R.id.btn_jumpform_jump);%0A        tv = (TextView) fromActivity.findViewById(R.id.tv_jumpfrom_display);%0A        et = (EditText) fromActivity.findViewById(R.id.et_jumpfrom);%0A    %7D%0A%0A    @Test%0A    public void testInputAndJump()%7B%0A        et.setText(%22music%22);%0A        btnJump.performClick();%0A%0A        Intent actualIntent = ShadowApplication.getInstance().getNextStartedActivity();%0A        Intent expectedIntent = new Intent(fromActivity, JumpToActivity.class);%0A        expectedIntent.putExtra(JumpToActivity.KEY_EXTRA_MESSAGE, %22music%22);%0A%0A        assertEquals(expectedIntent.getComponent().getClassName(),%0A                actualIntent.getComponent().getClassName());%0A        assertEquals(expectedIntent.getStringExtra(JumpToActivity.KEY_EXTRA_MESSAGE),%0A                actualIntent.getStringExtra(JumpToActivity.KEY_EXTRA_MESSAGE));%0A    %7D%0A%0A%7D%0A

test the jump action