Skip to content

Commit

Permalink
Adding test+ preparing new release
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Desmaisons committed Mar 13, 2019
1 parent 42026b7 commit 80a9e57
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
33 changes: 33 additions & 0 deletions DiscogsClient.Test/DiscogsArtistDeserializationTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Text;
using DiscogsClient.Data.Result;
using FluentAssertions;
using Newtonsoft.Json;
using Xunit;

namespace DiscogsClient.Test
{
public class DiscogsArtistDeserializationTest
{
private const string _JsonResponse = "{\"profile\": \"\", \"realname\": \"Steve Destailleur\", \"releases_url\": \"https://api.discogs.com/artists/20861/releases\", \"name\": \"Tevatron\", \"uri\": \"https://www.discogs.com/artist/20861-Tevatron\", \"images\": [{\"uri\": \"\", \"height\": 113, \"width\": 150, \"resource_url\": \"\", \"type\": \"primary\", \"uri150\": \"\"}], \"resource_url\": \"https://api.discogs.com/artists/20861\", \"aliases\": [{\"resource_url\": \"https://api.discogs.com/artists/575215\", \"id\": 575215, \"name\": \"St\\u00e9phane Destailleur\"}, {\"resource_url\": \"https://api.discogs.com/artists/8324\", \"id\": 8324, \"name\": \"Steve D\"}], \"id\": 20861, \"data_quality\": \"Needs Vote\", \"namevariations\": [\"Tevathron\"]}";
private readonly DiscogsArtist _Result;

public DiscogsArtistDeserializationTest()
{
_Result = JsonConvert.DeserializeObject<DiscogsArtist>(_JsonResponse);
}

[Fact]
public void DeserializeResult_IsNotNull()
{
_Result.Should().NotBeNull();
}

[Fact]
public void DeserializeResult_Has_RealName()
{
_Result.realname.Should().Be("Steve Destailleur");
}
}
}
1 change: 0 additions & 1 deletion DiscogsClient.Test/DiscogsClientTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public class DiscogsClientTest
public DiscogsClientTest()
{
_OAuthCompleteInformation = null;
//new OAuthCompleteInformation("", "", "", "");
_DiscogsClient = new DiscogsClient(_OAuthCompleteInformation);
}

Expand Down
6 changes: 3 additions & 3 deletions DiscogsClient/DiscogsClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyName>DiscogsClient</AssemblyName>
<RootNamespace>DiscogsClient</RootNamespace>
<Authors>David Desmaisons</Authors>
<Version>2.3.0</Version>
<Version>2.4.0</Version>
<PackageProjectUrl></PackageProjectUrl>
<RepositoryUrl>https://github.com/David-Desmaisons/DiscogsClient</RepositoryUrl>
<PackageLicenseUrl>https://github.com/David-Desmaisons/DiscogsClient/blob/master/LICENSE</PackageLicenseUrl>
Expand All @@ -22,8 +22,8 @@ Transparent management of pagination using none blocking API (Reactive IObservab
<PackageId>DiscogsClient</PackageId>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageTags>DiscogsClient, Asynchronous, Client</PackageTags>
<AssemblyVersion>2.2.1.0</AssemblyVersion>
<FileVersion>2.2.1.0</FileVersion>
<AssemblyVersion>2.4.0.0</AssemblyVersion>
<FileVersion>2.4.0.0</FileVersion>
<PackageReleaseNotes>Add release information: series, artist_sort and text format</PackageReleaseNotes>
</PropertyGroup>

Expand Down

0 comments on commit 80a9e57

Please sign in to comment.