@Override protected void setUp() throws Exception { super.setUp(); mMockContext = new ContactsMockContext(getContext()); mContactsProvider = mMockContext.getContactsProvider(); InjectedServices services = new InjectedServices(); AccountType accountType = new BaseAccountType() { @Override public boolean areContactsWritable() { return false; } }; accountType.accountType = "mockAccountType"; AccountWithDataSet account = new AccountWithDataSet("mockAccountName", "mockAccountType", null); mMockContext.setMockAccountTypeManager( new MockAccountTypeManager( new AccountType[] {accountType}, new AccountWithDataSet[] {account})); }
/* (non-Javadoc) * @see android.test.AndroidTestCase#scrubClass(java.lang.Class) */ @Override public void scrubClass(Class<?> testCaseClass) throws IllegalAccessException { super.scrubClass(testCaseClass); }
@Override public void tearDown() throws Exception { super.tearDown(); }
@Override public void setUp() throws Exception { super.setUp(); }
@Override protected void tearDown() throws Exception { mMockContext = null; mContactsProvider = null; super.tearDown(); }