This file contains hidden or 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
| func testThatLogInButtonTappedCallsPresenterLogInTapped() { | |
| viewController.logInButtonTapped() | |
| XCTAssertTrue(presenter.logInTappedCalled) | |
| } |
This file contains hidden or 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
| func testThatLogInTappedCallsInteractorPerformLogInRequest() { | |
| presenter.logInTapped() | |
| XCTAssertTrue(interactor.performLogInRequestCalled) | |
| } |
This file contains hidden or 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
| func testThatPerformLogInRequestCallsPresenterDidLogInSuccessfullyOnSuccess() { | |
| interactor.username = "Valid Username" | |
| interactor.password = "Valid Password" | |
| interactor.performLogInRequest() | |
| XCTAssertTrue(presenter.didLogInSuccessfullyCalled) | |
| } |
This file contains hidden or 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
| func testThatDidLogInSuccessfullyCallsRouterNavigateToHomeCalled() { | |
| presenter.didLogInSuccessfully() | |
| XCTAssertTrue(router.navigateToHomeCalled) | |
| } |
This file contains hidden or 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
| import SwiftUI | |
| struct SelfSizingSheet: ViewModifier { | |
| @State private var height: CGFloat = .zero | |
| private struct InnerHeightPreferenceKey: PreferenceKey { | |
| static let defaultValue: CGFloat = .zero | |
| static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) { | |
| value = nextValue() | |
| } |
This file contains hidden or 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
| import SwiftUI | |
| struct DynamicHeightVGrid: Layout { | |
| var numberOfColumns: Int | |
| var horizontalSpacing: CGFloat | |
| var verticalSpacing: CGFloat | |
| init( | |
| numberOfColumns: Int = 2, | |
| horizontalSpacing: CGFloat = 8, |
This file contains hidden or 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
| import SwiftUI | |
| extension CGColor { | |
| static let black = CGColor(red: 0, green: 0, blue: 0, alpha: 1) | |
| static let white = CGColor(red: 1, green: 1, blue: 1, alpha: 1) | |
| } | |
| struct CodableColor: Codable { | |
| static let black = CodableColor(cgColor: CGColor.black) | |
| static let white = CodableColor(cgColor: CGColor.white) |
OlderNewer