Hi,
I’ve added a simple test using robolectric framework, however when I try running my test I’m getting the following failures…
Error:(4, 23) error: package org.robolectric does not exist
Error:(5, 24) error: package org.junit.runner does not exist
Error:(6, 17) error: package org.junit does not exist
Error:(19, 2) error: cannot find symbol class RunWith
Error:(23, 10) error: cannot find symbol class Test
when I import robolectric classes i do not see any errors so not sure why I’m getting the above failures, have I missed anything?
Test:
import org.robolectric.RobolectricTestRunner;
import org.junit.runner.RunWith;
import org.junit.Test;
import static junit.framework.Assert.assertTrue;
@RunWith(RobolectricTestRunner.class)
public class luttest{
@Test
public void shouldFail() {
assertTrue(false);
}
}
gradle file:
dependencies {
// Tests
testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:2.3'
}
my file structure is 'src/main/test/java/'
thanks
--
You received this message because you are subscribed to the Google Groups "Robolectric" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robolectric...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
main {
java.srcDirs = ['src/main/java']
}
robolectric {
java.srcDir file('src/test/java/')