-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
write test inline view that checks if a fetch is done and message exp…
…ires, it dismisses
- Loading branch information
1 parent
05efd25
commit 236a9dc
Showing
10 changed files
with
328 additions
and
31 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
14 changes: 14 additions & 0 deletions
14
Sources/MessagingInApp/Gist/EngineWeb/EngineWebProvider.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,14 @@ | ||
import CioInternalCommon | ||
import Foundation | ||
|
||
// Allows us to mock EngineWeb instances for testing. | ||
protocol EngineWebProvider { | ||
func getEngineWebInstance(configuration: EngineWebConfiguration) -> EngineWebInstance | ||
} | ||
|
||
// sourcery: InjectRegisterShared = "EngineWebProvider" | ||
class EngineWebProviderImpl: EngineWebProvider { | ||
func getEngineWebInstance(configuration: EngineWebConfiguration) -> EngineWebInstance { | ||
EngineWeb(configuration: configuration) | ||
} | ||
} |
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
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
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
14 changes: 14 additions & 0 deletions
14
Tests/MessagingInApp/EngineWeb/EngineWebProviderStub.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,14 @@ | ||
@testable import CioMessagingInApp | ||
import Foundation | ||
|
||
class EngineWebProviderStub: EngineWebProvider { | ||
let engineWebMock: EngineWebInstance | ||
|
||
init(engineWebMock: EngineWebInstance) { | ||
self.engineWebMock = engineWebMock | ||
} | ||
|
||
func getEngineWebInstance(configuration: EngineWebConfiguration) -> EngineWebInstance { | ||
engineWebMock | ||
} | ||
} |
Oops, something went wrong.