Skip to content

Cannot run tests that use Hamcrest #36

@renatoathaydes

Description

@renatoathaydes

I wrote this Java test:

package example;

import org.junit.Test;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;

public class JavaTest {
    @Test
    public void test1() {
        assertThat(Main.greetings(), equalTo("Hello. World!"));
    }
}

As you probably know, JUnit depends on hamcrest (partial output of gradle depend):

testRuntimeClasspath - Runtime classpath of source set 'test'.
\--- junit:junit:4.12
     \--- org.hamcrest:hamcrest-core:1.3

So this should work, I think.

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