@Override protected void setUp() throws Exception { super.setUp(); mMainActivity = getActivity(); mOriginalData = new ArrayList<>(); // Save the original data and wipe out the storage StoreRetrieveData dataStorage = getDataStorage(); try { ArrayList<ToDoItem> items = dataStorage.loadFromFile(); if (items.size() > 0) { mOriginalData.clear(); mOriginalData.addAll(items); items.clear(); dataStorage.saveToFile(items); } } catch (Exception e) { fail("Couldn't store data: " + e.getMessage()); } }
@Override protected void tearDown() throws Exception { super.tearDown(); // Let's restore the data we might have wiped out during setUp()... StoreRetrieveData dataStorage = getDataStorage(); dataStorage.saveToFile(mOriginalData); }
@Override public T startActivity(Intent intent, Bundle savedInstanceState, Object lastNonConfigurationInstance) { return super.startActivity(intent, savedInstanceState, lastNonConfigurationInstance); } }
@Override public void scrubClass(Class<?> testCaseClass) throws IllegalAccessException { super.scrubClass(testCaseClass); }
@Override public ActivityT startActivity(Intent intent, Bundle savedInstanceState, Object lastNonConfigurationInstance) { return super.startActivity(intent, savedInstanceState, lastNonConfigurationInstance); }
@Override public void scrubClass(Class<?> testCaseClass) throws IllegalAccessException { super.scrubClass(testCaseClass); }
@Override public void setUp() throws Exception { super.setUp(); }
@Override protected void tearDown() throws Exception { super.tearDown(); launchConfig = null; }
@Override public T startActivity(Intent intent, Bundle savedInstanceState, Object lastNonConfigurationInstance) { return super.startActivity(intent, savedInstanceState, lastNonConfigurationInstance); } }
@Override public void setUp() throws Exception { super.setUp(); }
@Override public void tearDown() throws Exception { super.tearDown(); }
@Override public void setUp() throws Exception { super.setUp(); }
@Override public void tearDown() throws Exception { super.tearDown(); }
@Override protected void setUp() throws Exception { super.setUp(); // In setUp, you can create any shared test data, or set up mock components to inject // into your Activity. But do not call startActivity() until the actual test methods. mStartIntent = new Intent(Intent.ACTION_MAIN); }
@Override protected void tearDown() throws Exception { prefs = null; editor = null; super.tearDown(); }
@Override protected void setUp() throws Exception { super.setUp(); // In setUp, you can create any shared test data, or set up mock components to inject // into your Activity. But do not call startActivity() until the actual test methods. mStartIntent = new Intent(Intent.ACTION_MAIN); }
@Override protected void tearDown() throws Exception { prefs = null; editor = null; uut = null; super.tearDown(); }
@Override protected void setUp() throws Exception { super.setUp(); CalculonAssertions.register(this); ActivityLauncher.setTestCase(this); launchConfig = new LaunchConfiguration(); }
protected void tearDown() throws Exception { super.tearDown(); }
protected void setUp() throws Exception { super.setUp(); this.texts = new Texts(); } @SmallTest