Sha256: 4036f6a47687b06ed568b3df5290c3d4ec6d6eb85cea9da8baa2194f823beb49
Contents?: true
Size: 795 Bytes
Versions: 69
Compression:
Stored size: 795 Bytes
Contents
using System; using System.Collections.Generic; using Newtonsoft.Json.Linq; namespace Generators.Data { public static class CanonicalDataValue { public static string ExpectedToMultiLineString(object expected) { switch (expected) { case IEnumerable<string> enumerable: return string.Join("\\n\"+\n\"", enumerable); case JArray jarray: return ExpectedToMultiLineString(((JArray) expected).Values<string>()); case string str: return ExpectedToMultiLineString(str.Split('\n')); default: throw new ArgumentException("Cannot convert expected value to multil-ine string."); } } } }
Version data entries
69 entries across 69 versions & 1 rubygems