forked from salemove/ios-sdk-widgets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for CallVisualizerCoordinator
The delegates inside the coordinators are not tested because each coordinator itself tests the delegate methods functioning through their own set of tests. Also, the coordinators in this class are all private, so testing it from outside would require moving the coordinators to internal properties, which I would say is not desirable. MOB-2917
- Loading branch information
1 parent
962ea14
commit 6e1f9ab
Showing
4 changed files
with
249 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...ests/Sources/CallVisualizer/Coordinator/CallVisualizer.Coordinator.Environment.Mock.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import Foundation | ||
@testable import GliaWidgets | ||
|
||
extension CallVisualizer.Coordinator.Environment { | ||
static let mock: Self = .init( | ||
data: .mock, | ||
uuid: { .mock }, | ||
gcd: .mock, | ||
imageViewCache: .mock, | ||
uiApplication: .mock, | ||
uiScreen: .mock, | ||
uiDevice: .mock, | ||
notificationCenter: .mock, | ||
viewFactory: .mock(), | ||
presenter: .topViewController(application: .mock), | ||
bundleManaging: .live, | ||
screenShareHandler: .mock, | ||
timerProviding: .mock, | ||
requestVisitorCode: { completion in .mock }, | ||
audioSession: .mock, | ||
date: { .mock }, | ||
engagedOperator: { .mock() }, | ||
eventHandler: { event in }, | ||
orientationManager: .mock(), | ||
proximityManager: .mock, | ||
log: .mock, | ||
fetchSiteConfigurations: { completion in }, | ||
snackBar: .mock | ||
) | ||
} |
Oops, something went wrong.