mirror of
https://github.com/bitwarden/ios.git
synced 2025-12-11 13:54:06 -06:00
12 lines
320 B
Swift
12 lines
320 B
Swift
import Foundation
|
|
|
|
enum TestInstanceFactory {
|
|
static func create<T: NSObject>(_ type: T.Type, properties: [String: Any] = [:]) -> T {
|
|
let instance = type.init()
|
|
for property in properties {
|
|
instance.setValue(property.value, forKey: property.key)
|
|
}
|
|
return instance
|
|
}
|
|
}
|