static void Report(string filename, string description, string @case, bool success = true, string message = "" ) { message = ParseMessage(message); if (HarnessResult != null) { HarnessResult.AffectedSuites.ForEach(s => { s.Descriptions.ForEach(d => { //var descriptionWithUnderscores = description.Replace(' ', '_'); if (d.File.RelativePath == filename) { var actualCase = d.Cases.Where(c => c.Name == @case).FirstOrDefault(); if (actualCase == null) { actualCase = new Case { Name = @case }; d.AddCase(actualCase); } actualCase.Result = new CaseResult { Success = success, Message = message }; } }); }); } }
public void AddChildCase(Case @case) { @case.Parent = this; @case.Description = this.Description; _children.Add(@case); }
void PrintFailedCase(Case @case) { Console.Write(" it( {0} ) ", @case.FriendlyName()); Console.ForegroundColor = ConsoleColor.Red; Console.Write("FAILED"); Console.ResetColor(); Console.WriteLine(" with message : {0}", @case.Result.Message); }
void PrintPassedCase(Case @case) { if (_options.OnlyOutputFailed) return; Console.Write(" it( {0} ) ", @case.FriendlyName()); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("PASSED"); Console.ResetColor(); }
public static bool IsDummyOrEmptyCase(Case @case) { return @case == null || String.IsNullOrEmpty(@case.Name) || @case.Name == Case.DummyCase.Name; }
public void AddCase(Case @case) { @case.Description = this; _cases.Add(@case); }