Files
divkit/client/ios/DivKitTests/Entities/ExpectedEntities.swift
T
babaevmm 95b2190de9 fix LottieExtensionHandler getPreloadURLs
commit_hash:6be2bcdc26bfcc2123469b5970df6b3ed05cfbfc
2025-06-21 14:57:11 +03:00

93 lines
2.5 KiB
Swift

import DivKitTestsSupport
import Foundation
import VGSL
enum ExpectedEntities {
static let withRequiredProperty = EntityWithRequiredProperty(
property: .value("Some text")
)
static let withOptionalProperty = EntityWithOptionalProperty(
property: .value("Some text")
)
static let withMissingOptionalProperty = EntityWithOptionalProperty(
property: nil
)
static let withDefaultValue = EntityWithPropertyWithDefaultValue(
nested: EntityWithPropertyWithDefaultValue.Nested(
nonOptional: .value("Some text")
)
)
static let withRequiredComplexProperty = EntityWithComplexProperty(
property: EntityWithComplexProperty.Property(
value: .value(url("https://ya.ru"))
)
)
static let withOptionalComplexProperty = EntityWithOptionalComplexProperty(
property: EntityWithOptionalComplexProperty.Property(
value: .value(url("https://ya.ru"))
)
)
static let withMissingOptionalComplexProperty = EntityWithOptionalComplexProperty(
property: nil
)
static let withArray = EntityWithArray(
array: [
.entityWithComplexProperty(withRequiredComplexProperty),
.entityWithComplexProperty(withRequiredComplexProperty),
]
)
static let withHeterogeneousArray = EntityWithArray(
array: [
.entityWithComplexProperty(withRequiredComplexProperty),
.entityWithRequiredProperty(withRequiredProperty),
.entityWithStringEnumProperty(withStringEnumProperty),
]
)
static let withNestedArray = EntityWithArray(
array: [
.entityWithArray(withArray),
]
)
static let withArrayWithTransform = EntityWithArrayWithTransform(
array: [
.value(.colorWithHexCode(0x00_FF_00_FF)),
.value(.colorWithHexCode(0xFF_00_00_AA)),
]
)
static let withStringEnumProperty = EntityWithStringEnumProperty(
property: .value(.second)
)
static let withOptionalStringEnumProperty = EntityWithOptionalStringEnumProperty(
property: .value(.second)
)
static let withMissingStringEnumProperty = EntityWithOptionalStringEnumProperty(
property: nil
)
static let withArrayOfNestedItems = EntityWithArrayOfNestedItems(
items: [
EntityWithArrayOfNestedItems.Item(
entity: .entityWithComplexProperty(withRequiredComplexProperty),
property: .value("Some text")
),
EntityWithArrayOfNestedItems.Item(
entity: .entityWithComplexProperty(withRequiredComplexProperty),
property: .value("Some text")
),
]
)
}