Hi to all,
I'm new using Robolectric and JUnit in general and I'm trying to test the basic example, but it seams that the method equalTo is undefined and it cannot be founded.
My Libraries:
- android.jar
- maps.jar
- robolectric.1.0-RC1-jar-with-dependencies.jar
- JRE System Library [JavaSE-1.6]
- JUnit 4
The source code of the test is:
package com.example;
import static org.junit.Assert.assertThat;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.xtremelabs.robolectric.RobolectricTestRunner;
@RunWith(RobolectricTestRunner.class)
public class UiMainTest {
@Test
public void shouldHaveHappySmiles() throws Exception {
String hello = new UiMain().getResources().getString(R.string.hello);
assertThat(hello, equalTo("Hello World, MyActivity!"));
}
}
The error that I get is
The method equalTo(String) is undefined for the type UiMainTest
Any idea?
Thanks.