Skip to content

Commit

Permalink
Fix quality flaw: increase check coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Wohops committed Dec 23, 2016
1 parent 6f5072b commit 10302ab
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions java-checks/src/test/files/checks/NoTestInTestClassCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@ public class MyCucumberTest { // should not raise an issue
public class MyCucumber2Test { // no issue
}

@RunWith(MyRunner.class)
public class MyCucumber3Test { // Noncompliant - not recognized
}
@RunWith(getRunner())
public class MyCucumber4Test { // Noncompliant - does not compile, not a class literal
public Class<? extends Runner> getRunner() {
return null;
}
}
@RunWith(value1= MyRunner.class, value2= YourRunner.class)
public class MyCucumber5Test { // Noncompliant - does not compile, not a class literal
}

public class CTest {
@org.junit.jupiter.api.Test // no issue, junit5 annotation
public void testFoo() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class NoTestInTestClassCheckTest {
@Test
public void test() {
JavaCheckVerifier.verify("src/test/files/checks/NoTestInTestClassCheck.java", new NoTestInTestClassCheck());
JavaCheckVerifier.verifyNoIssueWithoutSemantic("src/test/files/checks/NoTestInTestClassCheck.java", new NoTestInTestClassCheck());
}

@Test
Expand Down

0 comments on commit 10302ab

Please sign in to comment.