BasicWindowTransition implements WindowTransition { @Override public void overrideStart(@NonNull final Activity activity) { activity.overridePendingTransition(startEnterAnimRes, startExitAnimRes); } BasicWindowTransition(@AnimRes final int enterAnim, @AnimRes final int exitAnim);  BasicWindowTransition(
			@AnimRes final int startEnterAnim,
			@AnimRes final int startExitAnim,
			@AnimRes final int finishEnterAnim,
			@AnimRes final int finishExitAnim
	);  BasicWindowTransition(
			@AnimRes final int startEnterAnim,
			@AnimRes final int startExitAnim,
			@AnimRes final int finishEnterAnim,
			@AnimRes final int finishExitAnim,
			@NonNull final String name
	); protected  BasicWindowTransition(@NonNull final Parcel source); @Override void writeToParcel(@NonNull final Parcel dest, final int flags); @Override int describeContents(); @Override @AnimRes int getStartEnterAnimation(); @Override @AnimRes int getStartExitAnimation(); @Override @AnimRes int getFinishEnterAnimation(); @Override @AnimRes int getFinishExitAnimation(); @Override @NonNull String getName(); @Override void overrideStart(@NonNull final Activity activity); @Override void overrideFinish(@NonNull final Activity activity); static final Creator<BasicWindowTransition> CREATOR; }
@Test public void testOverrideStart() { final Activity mockActivity = mock(TestActivity.class); final int startEnterAnimation = android.R.anim.fade_in; final int startExitAnimation = android.R.anim.fade_out; final int finishEnterAnimation = android.R.anim.slide_in_left; final int finishExitAnimation = android.R.anim.slide_out_right; final BasicWindowTransition transition = new BasicWindowTransition(startEnterAnimation, startExitAnimation, finishEnterAnimation, finishExitAnimation); transition.overrideStart(mockActivity); verify(mockActivity).overridePendingTransition(startEnterAnimation, startExitAnimation); verifyNoMoreInteractions(mockActivity); }
@Test public void testOverrideStartSimple() { final Activity mockActivity = mock(TestActivity.class); final int enterAnimation = android.R.anim.fade_in; final int exitAnimation = android.R.anim.fade_out; final BasicWindowTransition transition = new BasicWindowTransition(enterAnimation, exitAnimation); transition.overrideStart(mockActivity); verify(mockActivity).overridePendingTransition(enterAnimation, exitAnimation); verifyNoMoreInteractions(mockActivity); }