public void Format(StringBuilder result, ActualContainer actualValues, bool negation) { result.Append(negation ? "ожидались значения не эквивалентные" : "ожидалось значения эквивалентные"); result.AppendLine(": "); result.Append(Helpers.FormatStringValues(expectedValues, 2)); result.Append($@", но {Helpers.FormatActualValues(actualValues)}"); }
public void Format(StringBuilder result, ActualContainer actualValues, bool negation) { result.Append(negation ? negationExpectText : expectsText); if (expectedValue != null) { result.AppendLine(": "); result.Append(expectedValue); } result.Append($@", но {Helpers.FormatActualValues(actualValues)}"); }
public void Format(StringBuilder result, ActualContainer actualValues, bool negation) { if (value) { result.Append(negation ? "ожидалось ложным" : "ожидалось истиным"); } else { result.Append(negation ? "ожидалось истиным" : "ожидалось ложным"); } result.Append($@", но {Helpers.FormatActualValues(actualValues)}"); }
public static string FormatActualValues(ActualContainer actualContainer) { var actualValues = actualContainer.ActualValues; if (actualValues.Count > 0) { if (actualValues.Count == 1) { return(string.Format("было:" + Environment.NewLine + " '{0}'", actualValues.Single())); } var result = new StringBuilder(); result.AppendLine("было:"); result.Append(FormatStringValues(actualValues, 2)); return(result.ToString()); } else { return($"не был найден контрол {actualContainer.NotFoundMessage.ControlType.Name}({actualContainer.NotFoundMessage.Control.GetAbsolutePathBySelectors()})"); } }
public void Format(StringBuilder result, ActualContainer actualValues, bool negation) { result.Append(customText); }
public void Format(StringBuilder result, ActualContainer actualValues, bool negation) { result.AppendLine(negation ? "ожидалось не равным:" : "ожидалось равным:"); result.Append($@" '{expected}', но {Helpers.FormatActualValues(actualValues)}"); }
public void Format(StringBuilder result, ActualContainer actualContainer, bool negation) { result.Append(negation ? "ожидалось присутствие" : "ожидалось отсутствие"); }