public void CompressEscape_TestString_UnescapedDecompressedIsEqual() { var testData = "test_string0-9`,привет мир!{\"'}"; var compressed = StringCompressorEscaper.CompressEscape(testData); var decompressed = StringCompressorEscaper.UnescapeDecompress(compressed); Assert.AreEqual(testData, decompressed); }
private static string PreparePatternsString() { List <PatternDto> patternDtos = new List <PatternDto>() { new PatternDto { Key = "1", Value = "(?i)password(?-i)]> = <[\"\\w*\" || null]>" } }; var patternsStr = StringCompressorEscaper.CompressEscape(JsonConvert.SerializeObject(patternDtos, Formatting.None, new StringEnumConverter())); return(patternsStr); }