1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-29 18:49:51 +01:00
John Maguire c043eaba0c Add mostly done M3UParser with basic unit tests.
Add lots of test infrastructure.
2010-03-01 15:40:12 +00:00

32 lines
537 B
C++

#include "song.h"
#include <lastfm/Track>
#include "gtest/gtest.h"
#include "test_utils.h"
namespace {
class SongTest : public ::testing::Test {
};
TEST_F(SongTest, InitsFromLastFM) {
Song song;
lastfm::MutableTrack track;
track.setTitle("Foo");
lastfm::Artist artist("Bar");
track.setArtist(artist);
lastfm::Album album(artist, "Baz");
track.setAlbum(album);
song.InitFromLastFM(track);
EXPECT_EQ("Foo", song.title());
EXPECT_EQ("Baz", song.album());
EXPECT_EQ("Bar", song.artist());
}
} // namespace