diff --git a/Octokit.Tests/SimpleJsonSerializerTests.cs b/Octokit.Tests/SimpleJsonSerializerTests.cs index bd3a375b..6bbee04f 100644 --- a/Octokit.Tests/SimpleJsonSerializerTests.cs +++ b/Octokit.Tests/SimpleJsonSerializerTests.cs @@ -1,5 +1,7 @@ using Octokit.Helpers; using Octokit.Internal; +using System.Linq; +using System.Text; using Xunit; namespace Octokit.Tests @@ -64,6 +66,26 @@ namespace Octokit.Tests Assert.Equal("{\"int\":42,\"bool\":true}", json); } + [Fact] + public void HandleUnicodeCharacters() + { + var sb = new StringBuilder(); + sb.Append("My name has Unicode characters"); + Enumerable.Range(0, 19).Select(e => System.Convert.ToChar(e)) + .Aggregate(sb, (a, b) => a.Append(b)); + var backspace = "\b"; + var tab = "\t"; + sb.Append(backspace).Append(tab); + sb.Append("With non Unicode data at the end."); + var data = sb.ToString(); + + var sample = new Sample() { FirstName = data }; + var json = new SimpleJsonSerializer().Serialize(sample); + var deserializeObject = new SimpleJsonSerializer().Deserialize(json); + Assert.True(deserializeObject.FirstName.Equals(data)); + + } + [Fact] public void HandlesBase64EncodedStrings() { diff --git a/SolutionInfo.cs b/SolutionInfo.cs index e2fd9c8e..ba2f342f 100644 --- a/SolutionInfo.cs +++ b/SolutionInfo.cs @@ -6,10 +6,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyVersionAttribute("0.17.0")] [assembly: AssemblyFileVersionAttribute("0.17.0")] [assembly: ComVisibleAttribute(false)] -namespace System -{ - internal static class AssemblyVersionInformation - { +namespace System { + internal static class AssemblyVersionInformation { internal const string Version = "0.17.0"; } }