package com.xtremelabs.robolectric;

import android.view.View;
import com.xtremelabs.robolectric.shadows.ShadowView;
import com.xtremelabs.robolectric.util.Implements;
import org.junit.Test;
import org.junit.runner.RunWith;

import static com.xtremelabs.robolectric.Robolectric.shadowOf;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

@RunWith(WithTestDefaultsRunner.class)
public class TemporaryBindingsTest {

    @Test
    public void overridingShadowBindingsShouldNotAffectBindingsInLaterTests() throws Exception {
        assertThat(shadowOf(new View(null)).getClass().getSimpleName(), equalTo(ShadowView.class.getSimpleName()));

        Robolectric.bindShadowClass(TemporaryShadowView.class);

        assertThat(Robolectric.shadowOf_(new View(null)).getClass().getSimpleName(),
                equalTo(TemporaryShadowView.class.getSimpleName()));
    }

    @Test
    public void overridingShadowBindingsShouldNotAffectBindingsInLaterTestsAgain() throws Exception {
        assertThat(shadowOf(new View(null)).getClass().getSimpleName(), equalTo(ShadowView.class.getSimpleName()));

        Robolectric.bindShadowClass(TemporaryShadowView.class);

        assertThat(Robolectric.shadowOf_(new View(null)).getClass().getSimpleName(),
                equalTo(TemporaryShadowView.class.getSimpleName()));
    }

    @Implements(View.class)
    public static class TemporaryShadowView {}
}

@@ -94,26 +94,27 @@
 ric.
-shadows.ShadowView
+internal.Implements
 ;%0Aim
@@ -149,23 +149,26 @@
 ric.
-util.Implements
+shadows.ShadowView
 ;%0Aim

fix build