Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
65,300 | void () { doTest(); } | testCommentJustAfterSymbol |
65,301 | void () { doFileTest("yml"); } | doTest |
65,302 | String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/scalarConversion/data/"; } | getTestDataPath |
65,303 | void () { doTest(YAMLPlainTextImpl.class); } | testSimple |
65,304 | void () { doTest(YAMLPlainTextImpl.class); } | testSimpleTwoLines |
65,305 | void () { doTest(YAMLPlainTextImpl.class); } | testRubyCode |
65,306 | void (Class<? extends YAMLScalar>... notPreserveEols) { final PsiFile file = myFixture.configureByFile("sampleDocument.yml"); Collection<YAMLScalar> scalars = PsiTreeUtil.collectElementsOfType(file, YAMLScalar.class); assertEquals(5, scalars.size()); final String text; try { text = FileUtil.loadFile(new File(getTestDat... | doTest |
65,307 | String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/psiModification/data/"; } | getTestDataPath |
65,308 | void () { doMappingTest("key", "value"); } | testCreateKeyInEmptyFile |
65,309 | void () { doMappingTest("key2", "value2"); } | testCreateSecondTopLevelKey |
65,310 | void () { doMappingTest("key2", "value2"); } | testCreateSecondTopLevelKeyWithTailLines |
65,311 | void () { doMappingTest("key", "value2"); } | testReplaceTopLevelKey |
65,312 | void () { doMappingTest("key", "value"); } | testCreateSecondKeyLevelTwo |
65,313 | void () { doMappingTest("key", "value"); } | testCreateSecondKeyLevelTwoWithTailLines |
65,314 | void () { doMappingTest("key", "value"); } | testCreateSecondKeyLevelTwoWithComment |
65,315 | void () { doMappingTest("key", "value"); } | testCreateSecondKeyLevelTwoCompact |
65,316 | void () { doDeleteTest(); } | testDeleteKeyInEmptyFile |
65,317 | void () { doDeleteTest(); } | testDeleteKeyInFirstLine |
65,318 | void () { doDeleteTest(); } | testDeleteKeyInInvalidSyntax |
65,319 | void () { doDeleteTest(); } | testDeleteKeyInLastLine |
65,320 | void () { doDeleteTest(); } | testDeleteKeyInNestedMapping |
65,321 | void () { doDeleteTest(); } | testDeleteKeyInNestedMappingWithComment |
65,322 | void () { doDeleteTest(); } | testDeleteKeyWithCommentOnNextLine |
65,323 | void () { doDeleteTest(); } | testDeleteKeyWithCommentOnPreviousLine |
65,324 | void () { doDeleteTest(); } | testDeleteKeyWithCommentOnSameLine |
65,325 | void () { doValueTest("newValue"); } | testReplaceValueScalarScalar |
65,326 | void () { doValueTest("newValue"); } | testReplaceValueCompoundScalar |
65,327 | void () { doValueTest(""" someKey: - bla - bla"""); } | testReplaceValueScalarCompound |
65,328 | void () { doValueTest("newValue"); } | testSetValueScalar |
65,329 | void () { doValueTest(""" someKey: - bla - bla"""); } | testSetValueCompound |
65,330 | void (final String valueText) { myFixture.configureByFile(getTestName(true) + ".yml"); final int offset = myFixture.getCaretOffset(); final PsiElement elementAtCaret = myFixture.getFile().findElementAt(offset); final YAMLKeyValue keyValue = PsiTreeUtil.getParentOfType(elementAtCaret, YAMLKeyValue.class, false); assertN... | doValueTest |
65,331 | void (final String key, final String content) { myFixture.configureByFile(getTestName(true) + ".yml"); final int offset = myFixture.getCaretOffset(); final PsiElement elementAtCaret = myFixture.getFile().findElementAt(offset); final YAMLMapping mapping = PsiTreeUtil.getParentOfType(elementAtCaret, YAMLMapping.class, fa... | doMappingTest |
65,332 | void () { myFixture.configureByFile(getTestName(true) + ".yml"); final PsiElement element = myFixture.getElementAtCaret(); final YAMLKeyValue keyValue = PsiTreeUtil.getParentOfType(element, YAMLKeyValue.class, false); WriteCommandAction.runWriteCommandAction(getProject(), () -> keyValue.getParentMapping().deleteKeyValu... | doDeleteTest |
65,333 | String () { return myGroupId; } | getGroupId |
65,334 | String () { return myArtifactId; } | getArtifactId |
65,335 | String () { return myVersion; } | getVersion |
65,336 | String () { StringBuilder builder = new StringBuilder(); append(builder, myGroupId); append(builder, myArtifactId); append(builder, myVersion); return builder.toString(); } | getKey |
65,337 | String () { return getKey(); } | getDisplayString |
65,338 | void (StringBuilder builder, String part) { if (builder.length() != 0) builder.append(':'); appendFirst(builder, part); } | append |
65,339 | void (StringBuilder builder, String part) { builder.append(part == null ? "<unknown>" : part); } | appendFirst |
65,340 | String () { return getDisplayString(); } | toString |
65,341 | boolean (@Nullable String groupId, @Nullable String artifactId) { if (!Objects.equals(myArtifactId, artifactId)) return false; if (!Objects.equals(myGroupId, groupId)) return false; return true; } | equals |
65,342 | boolean (@Nullable String groupId, @Nullable String artifactId, @Nullable String version) { if (!equals(groupId, artifactId)) return false; if (!Objects.equals(myVersion, version)) return false; return true; } | equals |
65,343 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MavenId other = (MavenId)o; return equals(other.getGroupId(), other.myArtifactId, other.myVersion); } | equals |
65,344 | int () { int result; result = (myGroupId != null ? myGroupId.hashCode() : 0); result = 31 * result + (myArtifactId != null ? myArtifactId.hashCode() : 0); result = 31 * result + (myVersion != null ? myVersion.hashCode() : 0); return result; } | hashCode |
65,345 | void () { AddGradleDslDependencyAction.TEST_THREAD_LOCAL.set(Arrays.asList(new MavenId("testGroupId", "testArtifactId", "1.0"))); doTest("testAddMavenDependencyInEmptyFile.gradle"); } | testAddMavenDependencyInEmptyFile |
65,346 | void () { AddGradleDslDependencyAction.TEST_THREAD_LOCAL.set(Arrays.asList(new MavenId("testGroupId", "testArtifactId", "1.0"))); doTest("testAddMavenDependencyIntoExistingBlock.gradle"); } | testAddMavenDependencyIntoExistingBlock |
65,347 | void (String file) { WriteCommandAction.runWriteCommandAction(getProject(), () -> CodeInsightTestUtil.doActionTest(new AddGradleDslDependencyAction(), file, myFixture)); } | doTest |
65,348 | String () { return "/plugins/gradle/java/testData"; } | getBasePath |
65,349 | String () { return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/') + getBasePath(); } | getTestDataPath |
65,350 | Set<MavenRemoteRepository> (@NotNull Project project) { return MavenRepositoriesHolder.getInstance(project).getRemoteRepositories(); } | getRemoteRepositories |
65,351 | void (@NotNull ExternalSystemTaskId id) { if (GradleConstants.SYSTEM_ID.getId().equals(id.getProjectSystemId().getId()) && id.getType() == ExternalSystemTaskType.RESOLVE_PROJECT) { Project project = id.findProject(); if (project != null) { new ImportMavenRepositoriesTask(project).schedule(); } } } | onSuccess |
65,352 | URI (@Nullable GrExpression expression) { if (expression == null) return null; try { if (expression instanceof PsiLiteral) { URI uri = new URI(String.valueOf(((PsiLiteral)expression).getValue())); if (uri.getScheme() != null && StringUtil.startsWith(uri.getScheme(), "http")) return uri; } } catch (URISyntaxException ig... | resolveUriFromSimpleExpression |
65,353 | void (@NotNull final Project project, @NotNull final Editor editor, @NotNull final PsiFile file) { if (!EditorModificationUtil.checkModificationAllowed(editor) || !FileModificationService.getInstance().preparePsiElementsForWrite(file)) return; final List<MavenId> ids; if (ApplicationManager.getApplication().isUnitTestM... | invoke |
65,354 | boolean () { return false; } | startInWriteAction |
65,355 | String (MavenId mavenId) { StringBuilder builder = new StringBuilder(); append(builder, mavenId.getGroupId()); append(builder, mavenId.getArtifactId()); append(builder, mavenId.getVersion()); return builder.toString(); } | getMavenArtifactKey |
65,356 | void (StringBuilder builder, String part) { if (builder.length() != 0) builder.append(':'); builder.append(part == null ? "" : part); } | append |
65,357 | CodeInsightActionHandler () { return new AddGradleDslDependencyActionHandler(); } | getHandler |
65,358 | boolean (@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { if (packageSearchPluginEnabled()) return false; if (file instanceof PsiCompiledElement) return false; if (!GradleFileType.isGradleFile(file)) return false; return !GradleConstants.SETTINGS_FILE_NAME.equals(file.getName()); } | isValidForFile |
65,359 | Boolean () { if (ApplicationManager.getApplication().isUnitTestMode()) return false; return ofNullable(getPlugin(getId("com.jetbrains.packagesearch.intellij-plugin"))).map(p -> p.isEnabled()).orElse(false); } | packageSearchPluginEnabled |
65,360 | void () { PsiFile file = myFixture.configureByText("A.java", """ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import java.util.*; @RunWith(Parameterized.class) public class A { @Parameterized.Parameters public static Collection<Object[]> data() { return Arrays.asList(n... | testInnerClassesForKnownRunners |
65,361 | Collection<Object[]> () { return Arrays.asList(new Object[] {"11"}, new Object[] {"12"}); } | data |
65,362 | void () {} | testMe |
65,363 | void () { myFixture.addClass("package junit.framework; public class TestCase {}"); PsiFile file = myFixture.configureByText("Foo.java", """ public class Foo extends junit.framework.TestCase { public class Bar extends Foo { public void testFoo() { } } public void testFoo2() { } }"""); PsiClass aClass = ((PsiClassOwner)f... | testJUnit3TestCase |
65,364 | void () { } | testFoo |
65,365 | void () { } | testFoo2 |
65,366 | void () { myFixture.addClass("package p; import org.junit.*; import org.junit.runners.*; public class Theories extends Parameterized {}"); myFixture.addClass("package p; public @interface Theory {}"); //custom annotation PsiFile file = myFixture.configureByText("A.java", """ import org.junit.Test; import org.junit.runn... | testKnownClassInheritor |
65,367 | void (int param) {} | validTestMethod |
65,368 | void () {} | testMe |
65,369 | void () { myFixture.addClass("import org.junit.runner.Runner;" + "public class CustomRunner extends Runner {}"); PsiFile file = myFixture.configureByText("CustomRunnerTest.java", """ import org.junit.rules.ExternalResource; import org.junit.runner.RunWith; @RunWith(CustomRunner.class) public class CustomRunnerTest { @o... | testCustomRunner |
65,370 | ExternalResource () {return null;} | noTest |
65,371 | void () {} | foo |
65,372 | void () { myFixture.addClass("package org.mockito.junit; import org.junit.runner.Runner; import org.junit.runner.manipulation.Filterable; " + "public class MockitoJUnitRunner extends Runner implements Filterable {}"); PsiFile file = myFixture.configureByText("MockitoRunnerTest.java", """ import org.junit.rules.External... | testMockitoRunner |
65,373 | ExternalResource () {return null;} | noTest |
65,374 | void () {} | foo |
65,375 | void () { myFixture.addClass("package net.jqwik.api;" + "@org.junit.platform.commons.annotation.Testable public @interface Property {}"); myFixture.addClass("package org.junit.platform.commons.annotation;" + "public @interface Testable {}"); myFixture.addClass("package net.jqwik.api; public @interface ForAll {}"); PsiF... | testJqwikProperty |
65,376 | void () { myFixture.addClass("package org.junit.jupiter.api;" + "@org.junit.platform.commons.annotation.Testable public @interface Test {}"); myFixture.addClass("package org.junit.jupiter.api;" + "@org.junit.platform.commons.annotation.Testable public @interface Disabled {}"); PsiFile file = myFixture.configureByText("... | testableMethodTest |
65,377 | void () { myFixture.addClass("package org.junit.jupiter.api;" + "@org.junit.platform.commons.annotation.Testable public @interface Test {}"); PsiFile file = myFixture.configureByText("TestableClassTest.java", """ @org.junit.platform.commons.annotation.Testable class TestableClassTest { \tvoid foo() {} }"""); PsiClass a... | testableClassTest |
65,378 | void () { myFixture.addClass("package junit.framework; public class TestCase {}"); myFixture.addClass("package org.testng.annotations;\n" + "public @interface Test {}"); myFixture.addClass("package org.testng.annotations;\n" + "public @interface BeforeMethod {}"); myFixture.addClass("package org.testng.annotations;\n" ... | testMixJUnit3AndTestNG |
65,379 | void () { PsiFile file = myFixture.addFileToProject("some.txt", ""); SMTestProxy proxy = new SMTestProxy("test1", false, "file://" + file.getVirtualFile().getPath()); proxy.setLocator(new FileUrlProvider()); proxy.putUserData(SMTestProxy.NODE_ID, "nodeId"); assertEquals("nodeId", TestUniqueId.getEffectiveNodeId(proxy, ... | testValidateUniqueId |
65,380 | void () { PsiClass psiClass = myFixture.addClass("class MyTest {void m() {}}"); JUnit5TestFrameworkSetupUtil.setupJUnit5Library(myFixture); SMTestProxy parent = new SMTestProxy("MyTest", true, "java:suite://MyTest"); SMTestProxy proxy = new SMTestProxy("nodeId", false, "java:test://MyTest.m"); proxy.setLocator(JavaTest... | testGeneratedName |
65,381 | void () { PsiClass psiClass = myFixture.addClass(""" /** @noinspection ALL*/ @org.junit.platform.commons.annotation.Testable class MyTest { public Object testScenario = null; }"""); JUnit5TestFrameworkSetupUtil.setupJUnit5Library(myFixture); SMTestProxy parent = new SMTestProxy("MyTest", true, "java:suite://MyTest"); S... | testCustomEngineId |
65,382 | void () { myFixture.configureByText("Test.java", """ import org.junit.jupiter.params.provider.EnumSource; class Test { enum HostnameVerification { YES, NO; } @EnumSource(HostnameVerification.class) static void test(HostnameVerification hostnameVerification) { System.out.println(hostnameVerification); } public static vo... | testRecognizeTestMethodInParameterizedClass |
65,383 | void (HostnameVerification hostnameVerification) { System.out.println(hostnameVerification); } | test |
65,384 | void (String[] args) { test(null); } | main |
65,385 | void () { myFixture.configureByText("MyTest.java", """ import org.junit.jupiter.params.ParameterizedTest;class MyTest { @ParameterizedTest(name = "{0}") void byName(String name) {} }"""); myFixture.testHighlighting(true, false, false); } | testParameterizedDisplayNameByParameter |
65,386 | void () { myFixture.configureByText("Test.java", """ import org.junit.jupiter.api.io.TempDir; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.nio.file.Path; import static org.assertj.core.api.Ass... | testJunitTempDirMetaAnnotation |
65,387 | void () { myFixture.addClass(""" abstract class ATest extends junit.framework.TestCase { public void testMe() { int i = 0; int j = 0; int k = 0; fail(); } }"""); myFixture.addClass("public class ChildTest extends ATest {}"); final SMTestProxy testProxy = new SMTestProxy("testMe", false, "java:test://ChildTest/testMe");... | testStackTraceParseerAcceptsJavaStacktrace |
65,388 | void (JavaModuleFixtureBuilder moduleBuilder) { //moduleBuilder.addLibrary("junit3", JavaSdkUtil.getJunit3JarPath()); moduleBuilder.addLibrary("junit4", ArrayUtilRt.toStringArray(JavaSdkUtil.getJUnit4JarPaths())); moduleBuilder.addLibrary("ideaRt", JavaSdkUtil.getIdeaRtJarPath()); moduleBuilder.addLibrary("empty"); } | tuneFixture |
65,389 | void () { assertSame(DependencyScope.TEST, getScope("junit3")); } | _testJunit3 |
65,390 | void () { assertSame(DependencyScope.TEST, getScope("junit4")); } | testJunit4 |
65,391 | void () { assertNull(getScope("ideaRt")); } | testOrdinaryLibrary |
65,392 | void () { assertNull(getScope("empty")); } | testEmptyLibrary |
65,393 | DependencyScope (String name) { LibraryOrderEntry entry = OrderEntryUtil.findLibraryOrderEntry(ModuleRootManager.getInstance(getModule()), name); assertNotNull(entry); Library library = entry.getLibrary(); assertNotNull(library); return new JUnitDependencyScopeSuggester().getDefaultDependencyScope(library); } | getScope |
65,394 | void () { PsiElementFactory factory = myFixture.getJavaFacade().getElementFactory(); factory.createExpressionFromText("1+2", null); factory.createExpressionFromText("!1+2", null); factory.createExpressionFromText("!1+ 2", null); } | testValidTags |
65,395 | void () { myFixture.addClass("abstract class ATest extends junit.framework.TestCase {" + " public void testMe() {}\n" + "}"); myFixture.addClass("public class ChildTest extends ATest {}"); final SMTestProxy testProxy = new SMTestProxy("testMe", false, "java:test://ChildTest/testMe"); final Project project = getProject(... | testIncludeMethodsToRerunFromChildClass |
65,396 | void () { myFixture.addClass(""" package org.junit.runner; public @interface RunWith { Class<? extends Runner> value(); }"""); myFixture.addClass("package org.junit.runners; public class Parameterized {}"); final PsiClass testClass = myFixture.addClass(""" import org.junit.Test; import org.junit.runner.RunWith; import ... | testParameterizedTestNavigation |
65,397 | void () {} | testName1 |
65,398 | void () { final PsiClass baseClass = myFixture.addClass("abstract class ATest extends junit.framework.TestCase {" + " public void testMe() {}\n" + "}"); myFixture.addClass("public class ChildTest extends ATest {}"); final SMTestProxy testProxy = new SMTestProxy("testMe", false, "java:test://ChildTest/testMe"); final Pr... | testIgnoreRenamedMethodInRerunFailed |
65,399 | void () { myFixture.addClass(""" public class TestClass { public static class Tests extends junit.framework.TestCase { public void testFoo() throws Exception {} } }"""); final SMTestProxy testProxy = new SMTestProxy("testFoo", false, "java:test://TestClass$Tests/testFoo"); final Project project = getProject(); final Gl... | testInnerClass |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.