@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}));
  }
Пример #2
0
 /* (non-Javadoc)
  * @see android.test.AndroidTestCase#scrubClass(java.lang.Class)
  */
 @Override
 public void scrubClass(Class<?> testCaseClass) throws IllegalAccessException {
   super.scrubClass(testCaseClass);
 }
Пример #3
0
 @Override
 public void tearDown() throws Exception {
   super.tearDown();
 }
Пример #4
0
 @Override
 public void setUp() throws Exception {
   super.setUp();
 }
 @Override
 protected void tearDown() throws Exception {
   mMockContext = null;
   mContactsProvider = null;
   super.tearDown();
 }