Skip to content

Commit

Permalink
fix bug #23 - Run's CreatedOn field to be DateTime?
Browse files Browse the repository at this point in the history
  • Loading branch information
Astro03 committed Jul 8, 2016
1 parent 05130f5 commit e5df8cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TestRail/Types/Run.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class Run : BaseTestRailType
public DateTime? CompletedOn { get; private set; }

/// <summary>date on which the run which was created</summary>
public DateTime CreatedOn { get; private set; }
public DateTime? CreatedOn { get; private set; }

/// <summary>number of tests in the plan that passed</summary>
public uint? PassedCount { get; private set; }
Expand Down Expand Up @@ -117,7 +117,7 @@ public static Run Parse(JObject json)
Config = (string)json["config"],
IsCompleted = (bool?)json["is_completed"],
CompletedOn = null == (int?)json["completed_on"] ? (DateTime?)null : new DateTime(1970, 1, 1).AddSeconds((int)json["completed_on"]),
CreatedOn = new DateTime(1970, 1, 1).AddSeconds((int)json["created_on"]),
CreatedOn = null == (int?)json["created_on"] ? (DateTime?)null : new DateTime(1970, 1, 1).AddSeconds((int)json["created_on"]),
PassedCount = (uint?)json["passed_count"],
BlockedCount = (uint?)json["blocked_count"],
UntestedCount = (uint?)json["untested_count"],
Expand Down

0 comments on commit e5df8cd

Please sign in to comment.