marshroute

Форк
0
/
AnimatingTransitionsHandlerSpy.swift 
68 строк · 2.8 Кб
1
@testable import Marshroute
2

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

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.