Skip to content

Commit c672b61

Browse files
committed
Added test case for serializing with PlaylistElementConverter
1 parent 8485e23 commit c672b61

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using Newtonsoft.Json;
4+
using NUnit.Framework;
5+
6+
namespace SpotifyAPI.Web.Tests
7+
{
8+
[TestFixture]
9+
public class PPlayableItemConverterTest
10+
{
11+
[Test]
12+
public void PlayableItemConverter_CanSerialize()
13+
{
14+
var context = new CurrentlyPlayingContext { Item = new FullTrack() };
15+
16+
Assert.DoesNotThrow(() =>
17+
{
18+
var serialized = JsonConvert.SerializeObject(context);
19+
});
20+
}
21+
}
22+
}

SpotifyAPI.Web/Models/Converters/PlaylistElementConverter.cs renamed to SpotifyAPI.Web/Models/Converters/PlayableItemConverter.cs

File renamed without changes.

0 commit comments

Comments
 (0)