Examples of ITestKind


Examples of org.eclipse.jdt.internal.junit.launcher.ITestKind

        return types[0];
    }

    private IType[] findTypesToLaunch(ICompilationUnit cu) throws InterruptedException, InvocationTargetException
    {
        ITestKind testKind = TestKindRegistry.getContainerTestKind(cu);
        return TestSearchEngine.findTests(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), cu, testKind);
    }
View Full Code Here

Examples of org.eclipse.jdt.internal.junit.launcher.ITestKind

            if (!CoreTestSearchEngine.hasTestCaseType(javaProject))
            {
                abort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_junitnotonpath, null, IJUnitStatusConstants.ERR_JUNIT_NOT_ON_PATH);
            }

            ITestKind testKind = getTestRunnerKind(configuration);
            boolean isJUnit4Configuration = TestKindRegistry.JUNIT4_TEST_KIND_ID.equals(testKind.getId());
            if (isJUnit4Configuration && !CoreTestSearchEngine.hasTestAnnotation(javaProject))
            {
                abort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_junit4notonpath, null, IJUnitStatusConstants.ERR_JUNIT_NOT_ON_PATH);
            }
        }
View Full Code Here

Examples of org.eclipse.jdt.internal.junit.launcher.ITestKind

        }
    }

    private ITestKind getTestRunnerKind(ILaunchConfiguration configuration)
    {
        ITestKind testKind = JUnitLaunchConfigurationConstants.getTestRunnerKind(configuration);
        if (testKind.isNull())
        {
            testKind = TestKindRegistry.getDefault().getKind(TestKindRegistry.JUNIT3_TEST_KIND_ID); // backward compatible for launch configurations with no runner
        }
        return testKind;
    }
View Full Code Here

Examples of org.eclipse.jdt.internal.junit.launcher.ITestKind

            {
                return new IMember[] {((IType) testTarget).getMethod(testMethodName, new String[0])};
            }
        }
        HashSet result = new HashSet();
        ITestKind testKind = getTestRunnerKind(configuration);
        testKind.getFinder().findTestsInContainer(testTarget, result, monitor);
        if (result.isEmpty())
        {
            String msg = Messages.format(JUnitMessages.JUnitLaunchConfigurationDelegate_error_notests_kind, testKind.getDisplayName());
            abort(msg, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE);
        }
        return (IMember[]) result.toArray(new IMember[result.size()]);
    }
View Full Code Here

Examples of org.eclipse.jdt.internal.junit.launcher.ITestKind

        if (fKeepAlive)
        {
            programArguments.add(0, "-keepalive"); //$NON-NLS-1$
        }

        ITestKind testRunnerKind = getTestRunnerKind(configuration);
        getTestTarget(configuration, getJavaProject(configuration));
        programArguments.add("-testLoaderClass"); //$NON-NLS-1$
        programArguments.add(testRunnerKind.getLoaderClassName());
        programArguments.add("-loaderpluginname"); //$NON-NLS-1$
        programArguments.add(testRunnerKind.getLoaderPluginId());

        IMember[] testElements = fTestElements;

        // a test name was specified just run the single test
        if (testElements.length == 1)
View Full Code Here

Examples of org.eclipse.jdt.internal.junit.launcher.ITestKind

        {
            // we only do a search for compilation units or class files or
            // or source references
            if (javaElement instanceof ISourceReference)
            {
                ITestKind testKind = TestKindRegistry.getContainerTestKind(javaElement);
                testKindId = testKind.getId();

                IType[] types = TestSearchEngine.findTests(getLaunchConfigurationDialog(), javaElement, testKind);
                if ((types == null) || (types.length < 1))
                {
                    return;
View Full Code Here

Examples of org.eclipse.jdt.internal.junit.launcher.ITestKind

    }
    throw new InterruptedException(); // cancelled by user
  }

  private IType[] findTypesToLaunch(final ICompilationUnit cu) throws InterruptedException, InvocationTargetException {
    final ITestKind testKind= TestKindRegistry.getContainerTestKind(cu);
    final Set result = new HashSet();
    IRunnableWithProgress runnable= new IRunnableWithProgress() {
      public void run(IProgressMonitor pm) throws InterruptedException, InvocationTargetException {
        try {
          testKind.getFinder().findTestsInContainer(cu, result, pm);
        } catch (CoreException e) {
          throw new InvocationTargetException(e);
        }
      }
    };
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.