Skip to content
Snippets Groups Projects
Commit 4c45aa35 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Add CmixIsHealthy functor

parent ed3a5c67
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!18Update Bindings
......@@ -3,13 +3,15 @@ import Bindings
public struct Cmix {
public var getId: CmixGetId
public var makeReceptionIdentity: MakeReceptionIdentity
public var isHealthy: CmixIsHealthy
}
extension Cmix {
public static func live(_ bindingsCmix: BindingsCmix) -> Cmix {
Cmix(
getId: .live(bindingsCmix),
makeReceptionIdentity: .live(bindingsCmix)
makeReceptionIdentity: .live(bindingsCmix),
isHealthy: .live(bindingsCmix)
)
}
}
......@@ -17,6 +19,7 @@ extension Cmix {
extension Cmix {
public static let unimplemented = Cmix(
getId: .unimplemented,
makeReceptionIdentity: .unimplemented
makeReceptionIdentity: .unimplemented,
isHealthy: .unimplemented
)
}
import Bindings
import XCTestDynamicOverlay
public struct CmixIsHealthy {
public var run: () -> Bool
public func callAsFunction() -> Bool {
run()
}
}
extension CmixIsHealthy {
public static func live(_ bindingsCmix: BindingsCmix) -> CmixIsHealthy {
CmixIsHealthy(run: bindingsCmix.isHealthy)
}
}
extension CmixIsHealthy {
public static let unimplemented = CmixIsHealthy(
run: XCTUnimplemented("\(Self.self)")
)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment