GSoC/GCI Archive
Google Code-in 2014 KDE

Plasma mediacenter: write a testcase for some methods of library

completed by: Mikhail Ivchenko

mentors: Bhushan Shah

Plasma Media Center is designed to provide an easy and comfortable way to watch your videos, browse your photo collection and listen to your music, all in one place. This release brings many refinements and a host of new features, making consuming media even easier and more fun.

MediaLibrary is the important part of the Plasma media center, It receives data from media sources and stores them in-memory. This class is unit tested however code coverage plugin reports that two methods of this class is not unit tested (see line number 341 to 350)

QList< QSharedPointer< PmcAlbum > > getAlbums() const;
QList< QSharedPointer< PmcArtist > > getArtists() const;
Your job is to open autotests/medialibrarytest.cpp and autotests/medialibrarytest.h, check the test cases provided there and write a similar test case for this two methods.
For running tests you will also need to have mockcpp installed. To install mockcpp, visit this link
If you need any help ping bshah on Freenode IRC channel #plasma