Java 类org.robolectric.shadows.ShadowMediaPlayer 实例源码

项目:lasso    文件:AlarmTest.java   
@Before
public void setUp() {
    activity = Robolectric.buildActivity(MainActivity.class).create().get();
    shadowNotificationManager = shadowOf((NotificationManager) RuntimeEnvironment.application
            .getSystemService(Context.NOTIFICATION_SERVICE));
    shadowMediaPlayer = new ShadowMediaPlayer();
    shadowAudioManager = shadowOf((AudioManager) RuntimeEnvironment.application.getSystemService(Context.AUDIO_SERVICE));
    //(AudioManager) RuntimeEnvironment.application.getSystemService(Context.AUDIO_SERVICE);
    ShadowLog.stream = System.out;
    preferences = PreferenceManager.getDefaultSharedPreferences(activity.getApplicationContext());
}
项目:FullRobolectricTestSample    文件:Robolectric.java   
public static ShadowMediaPlayer shadowOf(MediaPlayer instance) {
  return (ShadowMediaPlayer) shadowOf_(instance);
}