mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
1d68e50782
commit_hash:8863bfcf57ccb5a8b9ea4986010f4770821772db
34 lines
1.0 KiB
Swift
34 lines
1.0 KiB
Swift
@_spi(Internal) @testable import DivKit
|
|
import VGSL
|
|
|
|
extension DivBlockModelingContext {
|
|
public static let testCardId = DivCardID(rawValue: "test_card_id")
|
|
|
|
public static var `default`: DivBlockModelingContext {
|
|
DivBlockModelingContext()
|
|
}
|
|
|
|
public init(
|
|
cardId: DivCardID = Self.testCardId,
|
|
additionalId: String? = nil,
|
|
actionHandler: DivActionHandler? = nil,
|
|
blockStateStorage: DivBlockStateStorage = DivBlockStateStorage(),
|
|
extensionHandlers: [DivExtensionHandler] = [],
|
|
scheduler: Scheduling? = nil,
|
|
variableStorage: DivVariableStorage? = nil
|
|
) {
|
|
self = DivBlockModelingContext(
|
|
cardId: cardId,
|
|
additionalId: additionalId,
|
|
actionHandler: actionHandler,
|
|
blockStateStorage: blockStateStorage,
|
|
imageHolderFactory: FakeImageHolderFactory(),
|
|
extensionHandlers: extensionHandlers,
|
|
variablesStorage: DivVariablesStorage(outerStorage: variableStorage),
|
|
scheduler: scheduler
|
|
).modifying(
|
|
cardLogId: cardId.rawValue
|
|
)
|
|
}
|
|
}
|