Commit 92ff27f5 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

MediaLibrary: Move createDevice wrapper in test code

parent 86bdf8b7
......@@ -276,11 +276,6 @@ std::shared_ptr<Device> MediaLibrary::device( const std::string& uuid )
return Device::fromUuid( m_dbConnection.get(), uuid );
}
std::shared_ptr<Device> MediaLibrary::addDevice( const std::string& uuid, bool isRemovable )
{
return Device::create( m_dbConnection.get(), uuid, isRemovable );
}
LabelPtr MediaLibrary::createLabel( const std::string& label )
{
return Label::create( m_dbConnection.get(), label );
......
......@@ -59,7 +59,6 @@ class MediaLibrary : public IMediaLibrary
bool deleteFolder(const Folder& folder );
std::shared_ptr<Device> device( const std::string& uuid );
std::shared_ptr<Device> addDevice( const std::string& uuid, bool isRemovable );
virtual LabelPtr createLabel( const std::string& label ) override;
virtual bool deleteLabel( LabelPtr label ) override;
......
......@@ -26,6 +26,7 @@
#include "Album.h"
#include "Artist.h"
#include "Device.h"
#include "File.h"
#include "filesystem/IFile.h"
#include "filesystem/IDirectory.h"
......@@ -147,3 +148,8 @@ void MediaLibraryTester::deleteArtist( unsigned int artistId )
{
Artist::destroy( m_dbConnection.get(), artistId );
}
std::shared_ptr<Device> MediaLibraryTester::addDevice( const std::string& uuid, bool isRemovable )
{
return Device::create( m_dbConnection.get(), uuid, isRemovable );
}
......@@ -41,6 +41,7 @@ public:
std::shared_ptr<Genre> createGenre( const std::string& name );
void deleteGenre( unsigned int genreId );
void deleteArtist( unsigned int artistId );
std::shared_ptr<Device> addDevice( const std::string& uuid, bool isRemovable );
private:
std::unique_ptr<fs::IDirectory> dummyDirectory;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment