@Override
  protected void tearDown() throws Exception {
    super.tearDown();

    // Stop Service
    getContext().stopService(new Intent(getContext(), GpsSensorService.class));
  }
  @Override
  protected void setUp() throws Exception {
    super.setUp();

    startService(new Intent(getContext(), GpsSensorService.class));

    mService = getService();
  }
 public void tearDown() throws Exception {
   Logger.v(TAG, "tearDown()");
   // Remove RemoteChatWindowManager of binder
   mBinder.removeChatWindowManager(mMockRemoteChatWindowManager);
   mBinder = null;
   mMockRemoteChatWindowManager = null;
   mChatWindowManagerAdapters = null;
   mRemoteChatWindowManager = null;
   super.tearDown();
 }
  public void setUp() throws Exception {
    super.setUp();
    setupService();

    Collection coll = new LocalCollection(getContext());
    tstTrack = coll.getQueries().get(0);
    Intent startIntent = new Intent(getContext(), PlaybackService.class);

    Assert.assertNotNull(tstTrack);
    startIntent.putExtra(
        PlaybackFragment.PLAYLIST_EXTRA, AlbumPlaylist.fromAlbum(tstTrack.getAlbum(), tstTrack));
    startService(startIntent);
  }
 @Override
 public void setUp() throws Exception {
   Logger.v(TAG, "setUp()");
   super.setUp();
   // Get WindowBinder from ApiService
   Intent intent = new Intent(getSystemContext(), ApiService.class);
   intent.setAction(IRemoteWindowBinder.class.getName());
   IBinder service = bindService(intent);
   assertTrue(service.isBinderAlive());
   mBinder = (WindowBinder) IRemoteWindowBinder.Stub.asInterface(service);
   assertNotNull(mBinder);
   mMockRemoteChatWindowManager = new MockRemoteChatWindowManager();
   Field fieldRemoteChatWindowManagers =
       Utils.getPrivateField(WindowBinder.class, "mChatWindowManagerAdapters");
   mChatWindowManagerAdapters =
       (List<ChatWindowManagerAdapter>) fieldRemoteChatWindowManagers.get(mBinder);
   // Add RemoteChatWindowManager to binder
   int startSize = mChatWindowManagerAdapters.size();
   mBinder.addChatWindowManager(mMockRemoteChatWindowManager, false);
   assertEquals(startSize + 1, mChatWindowManagerAdapters.size());
   mRemoteChatWindowManager = mChatWindowManagerAdapters.get(0);
   assertNotNull(mRemoteChatWindowManager);
 }
Exemplo n.º 6
0
 @Override
 public void setUp() throws Exception {
   super.setUp();
 }
 protected void tearDown() throws Exception {
   Thread.sleep(TEST_SEPARATION);
   super.tearDown();
 }
 protected void setUp() throws Exception {
   super.setUp();
   this.latch = null;
   this.commsService = null;
 }