marshroute
/
ModalTransitionsAnimatorSpy.swift
28 строк · 871.0 Байт
1@testable import Marshroute
2
3enum ModalTransitionsAnimatorSpyPerformCalls {
4case called(animationContext: ModalPresentationAnimationContext)
5}
6
7enum ModalTransitionsAnimatorSpyUndoCalls {
8case called(animationContext: ModalDismissalAnimationContext)
9}
10
11final class ModalTransitionsAnimatorSpy: ModalTransitionsAnimator
12{
13// MARK: - TransitionsAnimator
14
15var animatePerforming: ModalTransitionsAnimatorSpyPerformCalls!
16
17override func animatePerformingTransition(animationContext context: ModalPresentationAnimationContext)
18{
19animatePerforming = .called(animationContext: context)
20}
21
22var animateUndoing: ModalTransitionsAnimatorSpyUndoCalls!
23
24override func animateUndoingTransition(animationContext context: ModalDismissalAnimationContext)
25{
26animateUndoing = .called(animationContext: context)
27}
28}
29