marshroute
68 строк · 2.8 Кб
1@testable import Marshroute
2
3class AnimatingTransitionsHandlerSpy: BaseAnimatingTransitionsHandler, NavigationTransitionsHandler
4{
5// MARK: - TransitionsHandler
6var performTransitionCalled = false
7var perFormTransitionContextParameter: PresentationTransitionContext!
8override func performTransition(context: PresentationTransitionContext) {
9performTransitionCalled = true
10perFormTransitionContextParameter = context
11}
12
13var undoTransitionsAfterCalled = false
14var undoTransitionsAfterTransitionIdParameter: TransitionId!
15override func undoTransitionsAfter(transitionId: TransitionId) {
16undoTransitionsAfterCalled = true
17undoTransitionsAfterTransitionIdParameter = transitionId
18}
19
20var undoTransitionWithCalled = false
21var undoTransitionWithTransitionIdParameter: TransitionId!
22override func undoTransitionWith(transitionId: TransitionId) {
23undoTransitionWithCalled = true
24undoTransitionWithTransitionIdParameter = transitionId
25}
26
27var undoAllChainedTransitionsCalled = false
28override func undoAllChainedTransitions() {
29undoAllChainedTransitionsCalled = true
30}
31
32var undoAllTransitionsCalled = false
33override func undoAllTransitions() {
34undoAllTransitionsCalled = true
35}
36
37var resetWithTransitionCalled = false
38var resetWithTransitionContextParameter: ResettingTransitionContext!
39override func resetWithTransition(context: ResettingTransitionContext) {
40resetWithTransitionCalled = true
41resetWithTransitionContextParameter = context
42}
43
44// MARK: - TransitionAnimationsLauncher
45var launchPresentationAnimationCalled = false
46var launchPresentationAnimationLaunchingContextBoxParameter: PresentationAnimationLaunchingContextBox!
47override func launchPresentationAnimation(
48launchingContextBox: inout PresentationAnimationLaunchingContextBox) {
49launchPresentationAnimationCalled = true
50launchPresentationAnimationLaunchingContextBoxParameter = launchingContextBox
51}
52
53var launchDismissalAnimationCalled = false
54var launchDismissalAnimationLaunchingContextBoxParameter: DismissalAnimationLaunchingContextBox!
55override func launchDismissalAnimation(
56launchingContextBox: DismissalAnimationLaunchingContextBox) {
57launchDismissalAnimationCalled = true
58launchDismissalAnimationLaunchingContextBoxParameter = launchingContextBox
59}
60
61var launchResettingAnimationCalled = false
62var launchResettingAnimationLaunchingContextBoxParameter: ResettingAnimationLaunchingContextBox!
63override func launchResettingAnimation(
64launchingContextBox: inout ResettingAnimationLaunchingContextBox) {
65launchResettingAnimationCalled = true
66launchResettingAnimationLaunchingContextBoxParameter = launchingContextBox
67}
68}
69