public void ShouldCorrectlyParseTrackUri() { string testUri = "spotify:track:3QOruXa2lvqIFvOOa2rYyJ"; SpotifyUri uri = SpotifyUri.Parse(testUri); uri.Base.Should().Be("spotify"); uri.Type.Should().Be(UriType.track); uri.Id.Should().Be("3QOruXa2lvqIFvOOa2rYyJ"); uri.ToString().Should().Be(testUri); }
public void ShouldCorrectlyParseTrackUri() { string testUri = "spotify:track:3QOruXa2lvqIFvOOa2rYyJ"; SpotifyUri uri = SpotifyUri.Parse(testUri); Assert.AreEqual(uri.Base, "spotify"); Assert.AreEqual(uri.Type, UriType.track); Assert.AreEqual(uri.Id, "3QOruXa2lvqIFvOOa2rYyJ"); Assert.AreEqual(uri.ToString(), testUri); }
public void ShouldCorrectlyParsePlaylistUri() { string testUri = "spotify:user:spotifycharts:playlist:37i9dQZEVXbMDoHDwVN2tF"; SpotifyUri uri = SpotifyUri.Parse(testUri); uri.Base.Should().Be("spotify"); uri.Type.Should().Be(UriType.playlist); uri.Id.Should().Be("37i9dQZEVXbMDoHDwVN2tF"); uri.GetUriPropValue(UriType.user).Should().Be("spotifycharts"); uri.ToString().Should().Be(testUri); }
public void ShouldCorrectlyParsePlaylistUri() { string testUri = "spotify:user:spotifycharts:playlist:37i9dQZEVXbMDoHDwVN2tF"; SpotifyUri uri = SpotifyUri.Parse(testUri); Assert.AreEqual(uri.Base, "spotify"); Assert.AreEqual(uri.Type, UriType.playlist); Assert.AreEqual(uri.Id, "37i9dQZEVXbMDoHDwVN2tF"); Assert.AreEqual(uri.GetUriPropValue(UriType.user), "spotifycharts"); Assert.AreEqual(uri.ToString(), testUri); }