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 Foundation | |
import ComposableArchitecture | |
public protocol OpenAPIClientRequestProtocol:Equatable{ | |
associatedtype Client | |
associatedtype Request | |
associatedtype Response : Equatable | |
var client : Client {get} | |
var request: Request {get} | |
static func fetchOpenAPI(clientRequest: Self)async throws->Response |
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 XCTest | |
import OpenAPIRuntime | |
import OpenAPIURLSession | |
import HTTPTypes | |
fileprivate protocol OpenAPIClientRequestProtocol:Equatable{ | |
associatedtype Client | |
associatedtype Request | |
associatedtype Response : Equatable | |
var client : Client {get} |
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 XCTest | |
import ComposableArchitecture | |
@MainActor | |
@available(macOS 13.0, *) | |
final class BasicTests: XCTestCase { | |
let debounceDuration : DispatchQueue.SchedulerTimeType.Stride = 0.1 | |
let testQueue = DispatchQueue.test | |
typealias TestReducer = BaseAsyncCallReducer<Int,Int> | |
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 ComposableArchitecture | |
struct BaseAsyncCallReducer<RequestType:Equatable, ResponseType:Equatable>: Reducer{ | |
@Dependency(\.mainQueue) var mainQueue | |
//@Dependency(\.asyncCallClient) var asyncCallClient | |
@Dependency(\.errorHandler) var errorHandler | |
var fetch: ( Sendable) async throws -> Sendable | |
//public init(){} | |
public init(fetch: @escaping (Sendable)async throws -> Sendable) { | |
self.fetch = fetch |
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 | |
import ComposableArchitecture | |
import WebKit | |
public extension Notification.Name { | |
static let FromWKCoordinatorNotification = Notification.Name("FromWKCoordinatorNotification") | |
static let ToWKCoordinatorNotification = Notification.Name("ToWKCoordinatorNotification") | |
} | |
public enum WKMessageHandlersEvent: String, CaseIterable{ | |
case test |
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 XCTest | |
import ComposableArchitecture | |
import WebKit | |
public extension Notification.Name { | |
static let FromWKCoordinatorNotification = Notification.Name("FromWKCoordinatorNotification") | |
static let ToWKCoordinatorNotification = Notification.Name("ToWKCoordinatorNotification") | |
} | |
@MainActor |
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 ComposableArchitecture | |
import WebKit | |
public struct NotificationReducer<T:Equatable> : Reducer{ | |
var notificationAsyncStream: @Sendable () -> AsyncStream<Notification> | |
var fromWKCoordinatorNotification : Notification.Name | |
var toWKCoordinatorNotification : Notification.Name | |
var coordinatorID : String | |
public init(fromWKCoordinatorNotification: Notification.Name, toWKCoordinatorNotification: Notification.Name, coordinatorID: String) { | |
self.fromWKCoordinatorNotification = fromWKCoordinatorNotification |
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 | |
import WebKit | |
public extension Notification.Name { | |
static let FromWKCoordinatorNotification = Notification.Name("FromWKCoordinatorNotification") | |
static let ToWKCoordinatorNotification = Notification.Name("ToWKCoordinatorNotification") | |
} | |
public enum WKMessageHandlersEvent: String, CaseIterable{ | |
case test | |
case DOMContentLoaded |
NewerOlder