I'm trying to write some unit tests and need a way to make a dummy version of an object that is mappable. For example:
class MyClassJsonResponse: Mappable {
var status: String?
var response: String?
var errorCode: SAErrorCode?
init() {
}
required init?(_ map: Map) {
}
func mapping(map: Map) {
status <- map["status"]
response <- map["response"]
errorCode <- (map["error_code"], SAErrorCodeTransform())
}
}
Usually this is returned from an Alamofire call, but how would I manually create one and manually pass in an empty JSON string? Any advice on this would be greatly appreciated! Thanks!