/** * For IDE-1085. Test that disposing the object doesn't call releaseObject() if it has no ILaunch. * * @see #testDisposeWithILaunch() * @throws CoreException */ public void testDisposeWithoutILaunch() throws CoreException { // Ensure the local sandbox initializes fully ScaDebugPlugin.getInstance().getLocalSca(new NullProgressMonitor()); // Listen to the job manager for changes ReleaseJobListener jobListener = new ReleaseJobListener(); Job.getJobManager().addJobChangeListener(jobListener); try { // Setup the LocalScaWaveform object FakeApplication resource = new FakeApplication(); fixture.setObj(resource); // Call dispose fixture.dispose(); // Ensure the job to call releaseObject() is NOT scheduled assertFalse(jobListener.jobScheduled); } finally { Job.getJobManager().removeJobChangeListener(jobListener); } }
public void testPlugin() throws CoreException { LocalSca localSca = ScaDebugPlugin.getInstance().getLocalSca(null); Assert.assertNotNull(localSca); Assert.assertNotNull(localSca.getSandbox()); Assert.assertNotNull(TransactionUtil.getEditingDomain(localSca)); }