2017-08-21 12:00:27 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
|
|
|
|
** Copyright (C) 2017 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
|
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator.
|
|
|
|
|
**
|
|
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
|
|
|
|
**
|
|
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
|
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2018-02-20 12:43:05 +01:00
|
|
|
#include "googletest.h"
|
2017-08-21 12:00:27 +02:00
|
|
|
|
|
|
|
|
#include <utils/smallstring.h>
|
|
|
|
|
|
2018-02-20 12:43:05 +01:00
|
|
|
class MockSqliteDatabase;
|
|
|
|
|
|
2017-08-21 12:00:27 +02:00
|
|
|
class MockSqliteWriteStatement
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
MockSqliteWriteStatement() = default;
|
|
|
|
|
MockSqliteWriteStatement(Utils::SmallStringView sqlStatement, MockSqliteDatabase &)
|
|
|
|
|
: sqlStatement(sqlStatement)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
MOCK_METHOD0(execute,
|
|
|
|
|
void ());
|
|
|
|
|
|
2019-02-25 19:07:19 +01:00
|
|
|
MOCK_METHOD2(bind, void(int, Utils::SmallStringView));
|
2017-08-21 12:00:27 +02:00
|
|
|
|
|
|
|
|
MOCK_METHOD2(bindValues,
|
|
|
|
|
void (Utils::SmallStringView, Utils::SmallStringView));
|
|
|
|
|
|
2018-04-05 10:58:33 +02:00
|
|
|
MOCK_METHOD4(write,
|
|
|
|
|
void (uint, Utils::SmallStringView, Utils::SmallStringView, uint));
|
2017-08-21 12:00:27 +02:00
|
|
|
|
|
|
|
|
MOCK_METHOD4(write,
|
|
|
|
|
void (uint, uint, uint, uint));
|
|
|
|
|
|
2018-02-14 18:49:25 +01:00
|
|
|
MOCK_METHOD4(write,
|
|
|
|
|
void (long long, int, int, int));
|
|
|
|
|
|
2018-04-09 13:30:30 +02:00
|
|
|
MOCK_METHOD5(write,
|
|
|
|
|
void (long long, int, int, int, int));
|
|
|
|
|
|
2019-02-25 19:07:19 +01:00
|
|
|
MOCK_METHOD2(write, void(uint, Utils::SmallStringView));
|
2017-08-21 12:00:27 +02:00
|
|
|
|
2019-02-25 19:07:19 +01:00
|
|
|
MOCK_METHOD2(write, void(int, Utils::SmallStringView));
|
|
|
|
|
|
|
|
|
|
MOCK_METHOD2(write, void(Utils::SmallStringView, Utils::SmallStringView));
|
2018-01-22 14:21:01 +01:00
|
|
|
|
2019-03-13 15:09:30 +01:00
|
|
|
MOCK_METHOD3(write, void(int, Utils::SmallStringView, long long));
|
2018-02-20 12:43:05 +01:00
|
|
|
|
2018-01-29 12:07:15 +01:00
|
|
|
MOCK_METHOD3(write,
|
|
|
|
|
void (Utils::SmallStringView, Utils::SmallStringView, Utils::SmallStringView));
|
|
|
|
|
|
2018-02-08 12:48:46 +01:00
|
|
|
MOCK_METHOD4(write,
|
|
|
|
|
void (Utils::SmallStringView,
|
|
|
|
|
Utils::SmallStringView,
|
|
|
|
|
Utils::SmallStringView,
|
|
|
|
|
Utils::SmallStringView));
|
|
|
|
|
|
2019-01-23 14:10:58 +01:00
|
|
|
MOCK_METHOD8(write,
|
2019-03-13 15:09:30 +01:00
|
|
|
void(int,
|
2018-12-17 12:06:57 +01:00
|
|
|
Utils::SmallStringView,
|
|
|
|
|
Utils::SmallStringView,
|
|
|
|
|
Utils::SmallStringView,
|
2019-01-23 14:10:58 +01:00
|
|
|
Utils::SmallStringView,
|
|
|
|
|
int,
|
|
|
|
|
int,
|
|
|
|
|
int));
|
|
|
|
|
|
2017-09-21 11:43:59 +02:00
|
|
|
MOCK_METHOD1(write,
|
|
|
|
|
void (Utils::SmallStringView));
|
|
|
|
|
|
2018-01-22 14:21:01 +01:00
|
|
|
MOCK_METHOD1(write,
|
|
|
|
|
void (long long));
|
|
|
|
|
|
|
|
|
|
MOCK_METHOD1(write,
|
|
|
|
|
void (int));
|
|
|
|
|
|
2019-07-24 16:13:10 +02:00
|
|
|
MOCK_METHOD2(write, void(int, long long));
|
|
|
|
|
|
2018-01-22 14:21:01 +01:00
|
|
|
MOCK_METHOD2(write,
|
|
|
|
|
void (int, int));
|
|
|
|
|
|
2018-01-30 13:31:14 +01:00
|
|
|
MOCK_METHOD3(write,
|
|
|
|
|
void (uint, uint, uint));
|
|
|
|
|
|
2019-02-25 19:07:19 +01:00
|
|
|
MOCK_METHOD3(write, void(int, off_t, time_t));
|
2018-02-14 18:49:25 +01:00
|
|
|
|
2018-01-30 18:41:45 +01:00
|
|
|
MOCK_METHOD2(write,
|
|
|
|
|
void (uint, uint));
|
|
|
|
|
|
2018-11-06 19:02:00 +01:00
|
|
|
MOCK_METHOD2(write,
|
|
|
|
|
void (uchar, int));
|
2019-02-28 17:52:34 +01:00
|
|
|
MOCK_METHOD4(write, void(int, int, uchar, uchar));
|
2018-11-06 19:02:00 +01:00
|
|
|
MOCK_METHOD2(write,
|
|
|
|
|
void (long long, int));
|
2019-02-25 19:07:19 +01:00
|
|
|
MOCK_METHOD2(write, void(long long, Utils::SmallStringView));
|
2017-08-21 12:00:27 +02:00
|
|
|
Utils::SmallString sqlStatement;
|
|
|
|
|
};
|