TestRun.fromJson constructor
TestRun.fromJson(
- Map<String, dynamic> json
)
Implementation
factory TestRun.fromJson(Map<String, dynamic> json) {
DateTime? completedOn;
DateTime? createdOn;
DateTime? updatedOn;
if (json['completed_on'] != null) {
completedOn = DateTime.fromMillisecondsSinceEpoch(json['completed_on']);
}
if (json['created_on'] != null) {
createdOn = DateTime.fromMillisecondsSinceEpoch(json['created_on']);
}
if (json['updated_on'] != null) {
updatedOn = DateTime.fromMillisecondsSinceEpoch(json['updated_on']);
}
return TestRun(
assignedtoId: json['assignedto_id'],
blockedCount: json['blocked_count'],
completedOn: completedOn,
config: json['config'],
configIds: json['config_ids']?.cast<int>(),
createdBy: json['created_by'],
createdOn: createdOn,
customStatus1Count: json['custom_status1_count'],
customStatus2Count: json['custom_status2_count'],
customStatus3Count: json['custom_status3_count'],
customStatus4Count: json['custom_status4_count'],
customStatus5Count: json['custom_status5_count'],
customStatus6Count: json['custom_status6_count'],
customStatus7Count: json['custom_status7_count'],
description: json['description'],
failedCount: json['failed_count'],
id: json['id'],
includeAll: json['include_all'],
isCompleted: json['is_completed'],
milestoneId: json['milestone_id'],
name: json['name'],
passedCount: json['passed_count'],
planId: json['plan_id'],
projectId: json['project_id'],
refs: json['refs'],
retestCount: json['retest_count'],
suiteId: json['suite_id'],
untestedCount: json['untested_count'],
updatedOn: updatedOn,
url: json['url'],
);
}