Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ private fun List<DexFile>.parseClasses(customAnnotations: List<String>): Map<Str
val testMethods = dexFile
.createTestMethods(classDef, dexFile.findMethodIds())
.filter { it.containsTestAnnotation(customAnnotations) }
.filterNot { it.annotations.any { annotation -> annotation.name == JUNIT_IGNORE_ANNOTATION_NAME } }

ClassParsingResult(
dexFile = dexFile,
Expand All @@ -63,6 +64,7 @@ private fun List<DexFile>.parseClasses(customAnnotations: List<String>): Map<Str
.associateBy { it.className }

private const val JUNIT_TEST_ANNOTATION_NAME = "org.junit.Test"
private const val JUNIT_IGNORE_ANNOTATION_NAME = "org.junit.Ignore"

private fun TestMethod.containsTestAnnotation(customAnnotations: List<String>): Boolean {
for (a in customAnnotations) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.linkedin.parser.test.junit4.java;

import org.junit.Ignore;
import org.junit.Test;

import static org.junit.Assert.assertTrue;

public class IgnoredTest {

@Ignore @Test
public void IgnoredTest() {
assertTrue(true);
}
}