use of android.test.RenamingDelegatingContext in project WordPress-Android by wordpress-mobile.
the class WordPressDBTest method setUp.
@Override
protected void setUp() {
// Run tests in an isolated context
targetContext = new RenamingDelegatingContext(getInstrumentation().getTargetContext(), "test_");
testContext = getInstrumentation().getContext();
}
use of android.test.RenamingDelegatingContext in project android-jigsaw-puzzle by julesbond007.
the class JigsawActivityTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
RenamingDelegatingContext context = new RenamingDelegatingContext(this.getInstrumentation().getTargetContext().getApplicationContext(), "test_");
setActivityIntent(new Intent(context, JigsawActivity.class).putExtra("originalId", new LongParcelable(1L)));
activity = getActivity();
}
use of android.test.RenamingDelegatingContext in project standup-timer by jwood.
the class MeetingTest method setUp.
@Override
protected void setUp() {
daoFactory.setGlobalContext(new RenamingDelegatingContext(mContext, "test_"));
daoFactory.setCacheDAOInstances(true);
dao = daoFactory.getMeetingDAO(mContext);
}
use of android.test.RenamingDelegatingContext in project standup-timer by jwood.
the class TeamDetailsTest method setUpWithoutTestData.
private void setUpWithoutTestData() {
Intent intent = new Intent();
intent.putExtra("teamName", "Test Team");
setActivityIntent(intent);
a = getActivity();
daoFactory.setGlobalContext(new RenamingDelegatingContext(a, "test_"));
teamDao = daoFactory.getTeamDAO(a);
meetingDao = daoFactory.getMeetingDAO(a);
}
use of android.test.RenamingDelegatingContext in project standup-timer by jwood.
the class TeamDetailsTest method createTestData.
private void createTestData() {
Context context = new RenamingDelegatingContext(getInstrumentation().getTargetContext(), "test_");
TeamDAO teamFixturesDao = daoFactory.getTeamDAO(context);
MeetingDAO meetingFixturesDao = daoFactory.getMeetingDAO(context);
Team team = teamFixturesDao.save(new Team("Test Team"));
meetingFixturesDao.save(new Meeting(team, new GregorianCalendar(2010, 1, 5, 10, 15, 0).getTime(), 5, 301, 343, 30, 65));
meetingFixturesDao.save(new Meeting(team, new GregorianCalendar(2010, 1, 6, 10, 17, 0).getTime(), 8, 534, 550, 32, 120));
meetingFixturesDao.save(new Meeting(team, new GregorianCalendar(2010, 1, 7, 10, 16, 0).getTime(), 2, 234, 300, 23, 122));
meetingFixturesDao.save(new Meeting(team, new GregorianCalendar(2010, 1, 8, 10, 14, 0).getTime(), 3, 765, 765, 15, 78));
meetingFixturesDao.save(new Meeting(team, new GregorianCalendar(2010, 1, 9, 10, 12, 0).getTime(), 9, 444, 445, 10, 93));
}
Aggregations