File indexing completed on 2024-05-12 04:49:40
0001 /**************************************************************************************** 0002 * Copyright (c) 2010 Maximilian Kossick <maximilian.kossick@googlemail.com> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify it under * 0005 * the terms of the GNU General Public License as published by the Free Software * 0006 * Foundation; either version 2 of the License, or (at your option) any later * 0007 * version. * 0008 * * 0009 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0010 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0011 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0012 * * 0013 * You should have received a copy of the GNU General Public License along with * 0014 * this program. If not, see <http://www.gnu.org/licenses/>. * 0015 ****************************************************************************************/ 0016 0017 0018 0019 0020 0021 #ifndef MOCKCOLLECTIONLOCATIONDELEGATE_H 0022 #define MOCKCOLLECTIONLOCATIONDELEGATE_H 0023 0024 #include "core/collections/CollectionLocationDelegate.h" 0025 0026 #undef kWarning // WORKAROUND: Prevent symbols clash with KDE's kWarning macro 0027 #include <gmock/gmock.h> 0028 0029 namespace Collections { 0030 0031 class MockCollectionLocationDelegate : public CollectionLocationDelegate 0032 { 0033 public: 0034 MOCK_CONST_METHOD2( reallyDelete, bool( CollectionLocation *loc, const Meta::TrackList &tracks ) ); 0035 MOCK_CONST_METHOD2( reallyMove, bool( CollectionLocation *loc, const Meta::TrackList &tracks ) ); 0036 MOCK_CONST_METHOD2( reallyTrash, bool( CollectionLocation *loc, const Meta::TrackList &tracks ) ); 0037 MOCK_CONST_METHOD2( errorDeleting, void( CollectionLocation *loc, const Meta::TrackList &tracks ) ); 0038 MOCK_CONST_METHOD1( notWriteable, void( CollectionLocation *loc ) ); 0039 MOCK_CONST_METHOD1( deleteEmptyDirs, bool( CollectionLocation *loc ) ); 0040 MOCK_CONST_METHOD5( transcode, Transcoding::Configuration( 0041 const QStringList &playableFileTypes, bool *remember, OperationType operation, 0042 const QString &destCollectionName, const Transcoding::Configuration &prevConfiguration ) ); 0043 }; 0044 0045 } //namespace Collections 0046 0047 #endif