Skip to content

Commit

Permalink
Deserialize artists_sort (issue #8)
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Desmaisons committed Sep 19, 2018
1 parent 4bbb31c commit 70392b4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
10 changes: 8 additions & 2 deletions DiscogsClient.Test/ReleaseDeserializationTest.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using DiscogsClient.Data.Result;
using DiscogsClient.Data.Result;
using FluentAssertions;
using Newtonsoft.Json;
using System.Collections.Generic;
Expand Down Expand Up @@ -65,5 +64,12 @@ public void DeserializeResult_Deserialize_Series()
release.series.Should().HaveCount(1);
release.series[0].Should().BeEquivalentTo(expected);
}

[Fact]
public void DeserializeResult_Deserialize_Artists_sort()
{
var release = JsonConvert.DeserializeObject<DiscogsRelease>(_ReleaseJSON5);
release.artists_sort.Should().Be("Le Orme");
}
}
}
11 changes: 6 additions & 5 deletions DiscogsClient/Data/Result/DiscogsRelease.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@ public class DiscogsRelease : DiscogsReleaseBase
public DiscogsIdentifier[] identifiers { get; set; }
public DiscogsCommunity community { get; set; }
public DiscogsSerie[] series { get; set; }
public string artists_sort { get; set; }
public string catno { get; set; }
public string thumb { get; set; }
public string country { get; set; }
public DateTime date_added { get; set; }
public DateTime date_changed { get; set; }
public int estimated_weight { get; set; }
public int format_quantity { get; set; }
public string status { get; set; }
public int master_id { get; set; }
public string master_url { get; set; }
public string notes { get; set; }
public string released { get; set; }
public string released_formatted { get; set; }
public string notes { get; set; }
public DateTime date_added { get; set; }
public DateTime date_changed { get; set; }
public string status { get; set; }
public string thumb { get; set; }
}
}

0 comments on commit 70392b4

Please sign in to comment.