mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
19 lines
469 B
Swift
19 lines
469 B
Swift
import DivKit
|
|
import DivKitTestsSupport
|
|
import Testing
|
|
|
|
struct ShimmerStyleTester<Style: Equatable> {
|
|
private let styleFactory: ([String: Any], DivBlockModelingContext) throws -> Style
|
|
|
|
init(styleFactory: @escaping ([String: Any], DivBlockModelingContext) throws -> Style) {
|
|
self.styleFactory = styleFactory
|
|
}
|
|
|
|
func assertStyle(
|
|
_ style: Style,
|
|
_ dictionary: [String: Any]
|
|
) {
|
|
#expect(style == (try! styleFactory(dictionary, .default)))
|
|
}
|
|
}
|