Вот мой AutoMockable.stencil: https:/ /gist.github.com/levan9999/212647d48ef372e025d5794543ab303c
Вот мой настройка:
Код: Выделить всё
public protocol Foo {
associatedtype Input
associatedtype Output
associatedtype Failure: Error
@discardableResult
func bar(parameters: Input) -> AnyPublisher
}
// sourcery: AutoMockable
public protocol Bar: Foo
where Input == String,
Output == Bool,
Failure == Never { }
Код: Выделить всё
public class Bar: Foo {
public init() {}
}
Подробнее здесь: https://stackoverflow.com/questions/793 ... ated-types