/// <summary> /// Constructs an appropriate exception message from the set of parsing errors. /// </summary> /// <param name="parseErrors">The parse errors.</param> /// <returns>The exception message.</returns> private static string ConstructMessage(IEnumerable <EdmError> parseErrors) { return(ErrorStrings.EdmParseException_ErrorsEncounteredInEdmx(string.Join(Environment.NewLine, parseErrors.Select(p => p.ToString()).ToArray()))); }
private void RunInvalidTest(Func <XmlReader, IEdmModel> parse) { Action parseAction = () => parse(this.invalidReader); parseAction.ShouldThrow <EdmParseException>().WithMessage(ErrorStrings.EdmParseException_ErrorsEncounteredInEdmx(ErrorMessage)).And.Errors.Should().OnlyContain(e => e.ToString() == ErrorMessage); }