Пример #1
0
        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());
        }
Пример #2
0
        private void FillViolation()
        {
            ViolationList violationList = ViolationList.getInstance();
            Violation     violation     = violationList.getItem(_driver);

            if (violation != null)
            {
                ViolationInfo.Text = violation.ToString();
            }
        }
Пример #3
0
 private void RenderViolation(Violation violation)
 {
     this.outputWriter.WriteColoredLine(violation.ToString(), ConsoleColor.DarkRed);
 }
Пример #4
0
        public virtual string GetErrorMessage()
        {
            var result = string.Format("{0} at {1} {2} {3}", Violation.ToString(), NameSpace, ClassName, Method, Parameter);

            return(result);
        }