@@ -0,0 +1,1962 @@
+package com.peruukki.simplecurrencyconverter;%0A%0Aimport android.support.v4.view.ViewPager;%0Aimport android.support.v7.app.ActionBar;%0Aimport android.test.ActivityInstrumentationTestCase2;%0A%0Aimport com.peruukki.simplecurrencyconverter.adapters.TabAdapter;%0Aimport com.peruukki.simplecurrencyconverter.fragments.ConvertFragment;%0Aimport com.peruukki.simplecurrencyconverter.fragments.CurrenciesFragment;%0A%0Apublic class MainActivityTest extends ActivityInstrumentationTestCase2%3CMainActivity%3E %7B%0A%0A    private MainActivity mMainActivity;%0A    private TabAdapter mTabAdapter;%0A    private ActionBar mActionBar;%0A%0A    public MainActivityTest() %7B%0A        super(MainActivity.class);%0A    %7D%0A%0A    @Override%0A    protected void setUp() throws Exception %7B%0A        super.setUp();%0A%0A        mMainActivity = getActivity();%0A%0A        ViewPager tabPager = (ViewPager) mMainActivity.findViewById(R.id.pager);%0A        mTabAdapter = (TabAdapter) tabPager.getAdapter();%0A%0A        mActionBar = mMainActivity.getSupportActionBar();%0A    %7D%0A%0A    public void testPreconditions() %7B%0A        assertNotNull(%22TabAdapter is null%22, mTabAdapter);%0A        assertNotNull(%22ActionBar is null%22, mActionBar);%0A    %7D%0A%0A    public void testMainActivity_tabsCreated() %7B%0A        assertEquals(%22TabAdapter doesn't have 2 tabs%22, 2, mTabAdapter.getCount());%0A        assertEquals(%22ActionBar doesn't have 2 tabs%22, 2, mActionBar.getTabCount());%0A%0A        assertEquals(%221st tab is not instance of ConvertFragment%22,%0A            ConvertFragment.class, mTabAdapter.getItem(0).getClass());%0A        assertEquals(%222nd tab is not instance of CurrenciesFragment%22,%0A            CurrenciesFragment.class, mTabAdapter.getItem(1).getClass());%0A%0A        assertEquals(%221st tab has unexpected label%22,%0A            mMainActivity.getString(R.string.tab_convert), mActionBar.getTabAt(0).getText());%0A        assertEquals(%222nd tab has unexpected label%22,%0A            mMainActivity.getString(R.string.tab_currencies), mActionBar.getTabAt(1).getText());%0A    %7D%0A%7D%0A

Add first tests: test that the tabs are added in MainActivity