private void ShrinkFixtures(SimplestFailCase simplestFailcase, FalsifiableException previousFailure) { simplestFailcase .Fixtures .ForEach( f => f.Shrink( () => Fails(simplestFailcase.Fixtures, previousFailure))); }
public static string GetMessage(int testNumber, int fixtureNumber, FalsifiableException failure, SimplestFailCase simplestFailCase) { var sb = new StringBuilder(); sb.AppendLine(); sb.AppendFormat("Ran {0} test, {1} fixtures.", testNumber, fixtureNumber); sb.AppendLine(); if (failure.Spec != null) sb.AppendLine("Spec '" + failure.Spec.Name + "' does not hold."); if (simplestFailCase != null) { sb.Append(simplestFailCase.Report()); } return sb.ToString(); }
private SimplestFailCase ShrinkTransitionsList(List <IFixture> fixtures, FalsifiableException previousFailure) { var simplestFailCase = new SimplestFailCase(fixtures); var ix = 0; while (ix < simplestFailCase.Fixtures.Count - 1) { var lessActions = new List <IFixture>(simplestFailCase.Fixtures); lessActions.RemoveAt(ix); if (Fails(lessActions, previousFailure)) { simplestFailCase.Fixtures = lessActions; } else { ix++; } } return(simplestFailCase); }
public RunReport(int testNumber, int fixtureNumber, FalsifiableException failure, SimplestFailCase simplestFailCase) : base(GetMessage(testNumber, fixtureNumber, failure, simplestFailCase), failure) { this.simplestFailCase = simplestFailCase; }
public static string GetMessage(int testNumber, int fixtureNumber, FalsifiableException failure, SimplestFailCase simplestFailCase) { var sb = new StringBuilder(); sb.AppendLine(); sb.AppendFormat("Ran {0} test, {1} fixtures.", testNumber, fixtureNumber); sb.AppendLine(); if (failure.Spec != null) { sb.AppendLine("Spec '" + failure.Spec.Name + "' does not hold."); } if (simplestFailCase != null) { sb.Append(simplestFailCase.Report()); } return(sb.ToString()); }
public RunReport(int testNumber, int fixtureNumber, FalsifiableException failure, SimplestFailCase simplestFailCase) : base(GetMessage(testNumber, fixtureNumber, failure, simplestFailCase), failure) { this.simplestFailCase = simplestFailCase; }