public void ToStringReturnsViolationAsLine() { var expectedResult = "Line 666: [SA666] You cannot do this."; var violation = new Violation("SA666", "You cannot do this.", 666); Assert.AreEqual(expectedResult, violation.ToString()); }
private void FillViolation() { ViolationList violationList = ViolationList.getInstance(); Violation violation = violationList.getItem(_driver); if (violation != null) { ViolationInfo.Text = violation.ToString(); } }
private void RenderViolation(Violation violation) { this.outputWriter.WriteColoredLine(violation.ToString(), ConsoleColor.DarkRed); }
public virtual string GetErrorMessage() { var result = string.Format("{0} at {1} {2} {3}", Violation.ToString(), NameSpace, ClassName, Method, Parameter); return(result); }