Skip to content

WildcardPatternSuite.getBaseDir() - Nullpointer #15

@Ckrag

Description

@Ckrag

With a testsuite like:

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import com.googlecode.junittoolbox.SuiteClasses;
import com.googlecode.junittoolbox.WildcardPatternSuite;

@RunWith(WildcardPatternSuite.class)
@SuiteClasses("**/*Test.class")
public class NormalSuiteTest {}

However this results in the following Null-pointer:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.net.URI java.net.URL.toURI()' on a null object reference
at com.googlecode.junittoolbox.WildcardPatternSuite.getBaseDir(WildcardPatternSuite.java:149)
at com.googlecode.junittoolbox.WildcardPatternSuite.findSuiteClasses(WildcardPatternSuite.java:70)
at com.googlecode.junittoolbox.WildcardPatternSuite.getSuiteClasses(WildcardPatternSuite.java:65)
at com.googlecode.junittoolbox.WildcardPatternSuite.(WildcardPatternSuite.java:194)

My imports are as such:
testCompile 'junit:junit:4.12'
compile 'com.googlecode.junit-toolbox:junit-toolbox:1.10' (for some reason I can't resolve 1.11)

Not entirely sure if I grossly misunderstood something, but I can't find any examples/documentation that does it differently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions