diff --git a/src/Verify/Target.cs b/src/Verify/Target.cs index e9986f00a..dcd86c189 100644 --- a/src/Verify/Target.cs +++ b/src/Verify/Target.cs @@ -42,8 +42,12 @@ public Target(string extension, Stream data, string? name = null) if (FileExtensions.IsTextExtension(extension)) { - throw new($"Dont pass a stream for text. If {extension} is not a text extension then add `FileExtensions.RemoveTextExtensions(\"{extension}\")` at initialization; " + - "otherwise use `Target(string extension, string data)` or `Target(string extension, StringBuilder data, string? name)`."); + throw new( + $""" + Don't pass a stream for text. + If {extension} is not a text extension then use `FileExtensions.RemoveTextExtensions(\"{extension}\")` at initialization; + Otherwise use `Target(string extension, string data)` or `Target(string extension, StringBuilder data, string? name)`. + """); } Extension = extension; @@ -58,8 +62,12 @@ public Target(string extension, StringBuilder data, string? name = null) Guard.NotEmpty(name); if (!FileExtensions.IsTextExtension(extension)) { - throw new($"Dont pass a text for a binary extension. If {extension} is a text extension then add `FileExtensions.AddTextExtension(\"{extension}\")` at initialization; " + - "otherwise use `Target(string extension, Stream data, string? name)`."); + throw new( + $""" + Don't pass text for a binary extension. + If {extension} is a text extension then use `FileExtensions.AddTextExtension("{extension}")` at initialization; + Otherwise use `Target(string extension, Stream data, string? name)`. + """); } Extension = extension; @@ -74,8 +82,12 @@ public Target(string extension, string data, string? name = null) Guard.NotEmpty(name, nameof(name)); if (!FileExtensions.IsTextExtension(extension)) { - throw new($"Dont pass a text for a binary extension. If {extension} is a text extension then add `FileExtensions.AddTextExtension(\"{extension}\")` at initialization; " + - "otherwise use `Target(string extension, Stream data, string? name)`."); + throw new( + $""" + Don't pass a text for a binary extension. + If {extension} is a text extension then use `FileExtensions.AddTextExtension("{extension}")` at initialization; + Otherwise use `Target(string extension, Stream data, string? name)`. + """); } Extension = extension;