/// <summary>The default constructor for Result.</summary> /// <remarks>The default constructor for Result.</remarks> /// <param name="name"></param> public Result(Result.ResultStatus status, string description) { // or PASS // or FAIL // or UNKNOWN this.status = status; this.description = description; }
/// <summary>One-liner to create a Result by asserting something</summary> /// <param name="assertion"></param> /// <param name="statusIfFailed">the status to set if the test fails</param> private Result(bool assertion, Result.ResultStatus statusIfFailed) : this() { if (assertion) { this.SetStatus(Result.ResultStatus.VALID, null); } else { this.SetStatus(statusIfFailed, null); } }
/// <param name="status"></param> public virtual void SetStatus(Result.ResultStatus status, string description) { this.status = status; this.description = description; }