Esempio n. 1
0
        private static string Format(EventExpectation value, int indent)
        {
            var indentString = IndentString(indent);

            string result;

            if (value != null)
            {
                result =
                    indentString + $"!!{nameof (EventExpectation)} {{" + "\n" +
                    indentString + $"{nameof (EventExpectation.Level)}: {Format (value.Level)}" + "\n" +
                    indentString + $"{nameof (EventExpectation.Logger)}: {Format (value.Logger)}" + "\n" +
                    indentString + $"{nameof (EventExpectation.Thread)}: {Format (value.Thread)}" + "\n" +
                    indentString + $"{nameof (EventExpectation.Time)}: {Format (value.Time)}" + "\n" +
                    indentString + $"{nameof (EventExpectation.Message)}: {Format (value.Message)}" + "\n" +
                    indentString + $"{nameof (EventExpectation.Throwable)}: {Format (value.Throwable)}" + "\n" +
                    indentString + $"{nameof (EventExpectation.Properties)}: {Format (value.Properties, indent + 1)}" + "\n" +
                    indentString + $"{nameof (EventExpectation.Id)}: {Format (value.Id)}" + "\n" +
                    indentString + "}";
            }
            else
            {
                result = "!!null";
            }

            return(result);
        }
Esempio n. 2
0
 public static string Format(EventExpectation value)
 => Format(value, 0);