Search in sources :

Example 1 with RobolectricFrameworkMethod

use of org.robolectric.RobolectricTestRunner.RobolectricFrameworkMethod in project robolectric by robolectric.

the class RobolectricTestRunnerTest method equalityOfRobolectricFrameworkMethod.

@Test
public void equalityOfRobolectricFrameworkMethod() throws Exception {
    Method method = TestWithTwoMethods.class.getMethod("first");
    RobolectricFrameworkMethod rfm16 = new RobolectricFrameworkMethod(method, mock(AndroidManifest.class), new SdkConfig(16), mock(Config.class));
    RobolectricFrameworkMethod rfm17 = new RobolectricFrameworkMethod(method, mock(AndroidManifest.class), new SdkConfig(17), mock(Config.class));
    RobolectricFrameworkMethod rfm16b = new RobolectricFrameworkMethod(method, mock(AndroidManifest.class), new SdkConfig(16), mock(Config.class));
    assertThat(rfm16).isEqualTo(rfm16);
    assertThat(rfm16).isNotEqualTo(rfm17);
    assertThat(rfm16).isEqualTo(rfm16b);
    assertThat(rfm16.hashCode()).isEqualTo((rfm16b.hashCode()));
}
Also used : RobolectricFrameworkMethod(org.robolectric.RobolectricTestRunner.RobolectricFrameworkMethod) Config(org.robolectric.annotation.Config) SdkConfig(org.robolectric.internal.SdkConfig) SdkConfig(org.robolectric.internal.SdkConfig) AndroidManifest(org.robolectric.manifest.AndroidManifest) Method(java.lang.reflect.Method) RobolectricFrameworkMethod(org.robolectric.RobolectricTestRunner.RobolectricFrameworkMethod) Test(org.junit.Test)

Aggregations

Method (java.lang.reflect.Method)1 Test (org.junit.Test)1 RobolectricFrameworkMethod (org.robolectric.RobolectricTestRunner.RobolectricFrameworkMethod)1 Config (org.robolectric.annotation.Config)1 SdkConfig (org.robolectric.internal.SdkConfig)1 AndroidManifest (org.robolectric.manifest.AndroidManifest)1