mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
22 lines
500 B
Swift
22 lines
500 B
Swift
import DivKit
|
|
import DivKitTestsSupport
|
|
import XCTest
|
|
|
|
final class 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]
|
|
) throws {
|
|
XCTAssertEqual(
|
|
style,
|
|
try styleFactory(dictionary, .default)
|
|
)
|
|
}
|
|
}
|