mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 12:03:19 +00:00
Improve support for base64 strings
This commit is contained in:
@@ -113,6 +113,18 @@ namespace Octokit.Tests
|
||||
public string Content { get { return "*" + EncodedContent + "*"; } }
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void HandlesBase64EncodedStrings()
|
||||
{
|
||||
const string json = "{\"name\":\"RmVycmlzIEJ1ZWxsZXI=\",\"description\":\"stuff\",\"content\":\"RGF5IG9mZg==\"}";
|
||||
|
||||
var item = new SimpleJsonSerializer().Deserialize<SomeObject>(json);
|
||||
|
||||
Assert.Equal("Ferris Bueller", item.Name);
|
||||
Assert.Equal("Day off", item.Content);
|
||||
Assert.Equal("stuff", item.Description);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CanDeserializeOrganization()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user