示例#1
0
 public void Failure(ConeTestFailure failure)
 {
     if(hasFailed)
         return;
     hasFailed = true;
     writer.WriteFailure(failure.Context, failure.TestName);
 }
示例#2
0
 void ITestLogger.Failure(ConeTestFailure testFailure)
 {
     foreach(var failure in testFailure.Errors) {
     Maybe.Map(failure.Actual, failure.Expected, (actual, expected) => new { actual, expected })
         .Do( x => WriteLine("##teamcity[testFailed type='comparisionFailure' name='{0}' message='{1}' details='{2}'] actual='{3}' expected='{4}'", activeTest.TestName.Name, failure.Message, failure, x.actual, x.expected),
             () => WriteLine("##teamcity[testFailed name='{0}' message='{1}' details='{2}']", activeTest.TestName.Name, failure.Message, failure));
     }
 }
示例#3
0
 public void Failure(ConeTestFailure failure)
 {
     if(hasFailed)
         return;
     hasFailed = true;
     writer.Write(new ConsoleResult(failure) {
         Status = TestStatus.TestFailure,
         Duration = time.Elapsed,
     });
 }
示例#4
0
文件: XmlLogger.cs 项目: kitofr/Cone
        public void Failure(ConeTestFailure failure)
        {
            executed = true;
            success = false;
            if(FinalizeAttributes()) {
                xml.WriteAttributeString("assembly", new Uri(test.Assembly.Location).LocalPath);
            }

            xml.WriteStartElement("failure");
            xml.WriteAttributeString("context", failure.Context);
            xml.WriteAttributeString("file", failure.File);
            xml.WriteAttributeString("line", failure.Line.ToString(CultureInfo.InvariantCulture));
            xml.WriteAttributeString("column", failure.Column.ToString(CultureInfo.InvariantCulture));
                xml.WriteStartElement("message");
                xml.WriteCData(failure.Message);
                xml.WriteEndElement();
            xml.WriteEndElement();
        }
示例#5
0
 public void Failure(ConeTestFailure failure)
 {
     Interlocked.Increment(ref FailureCount);
 }
示例#6
0
 public void Failure(ConeTestFailure failure)
 {
     EachChild(x => x.Failure(failure));
 }
示例#7
0
 public void Failure(ConeTestFailure failure)
 {
     lock(failures) failures.Add(failure);
 }
示例#8
0
 public void Failure(ConeTestFailure failure)
 {
 }
示例#9
0
 public ConsoleResult(ConeTestFailure failure)
 {
     this.Context = failure.Context;
     this.TestName = failure.TestName;
 }