1#ifndef TENDUKE_TEST_MOCKS_JSONARRAYMOCK_H
2#define TENDUKE_TEST_MOCKS_JSONARRAYMOCK_H
4#include "json/JSONArray.h"
5#include "gmock/gmock.h"
7namespace tenduke {
namespace test {
namespace mocks {
12 MOCK_METHOD(
enum Type,
getType, (), (
const,
override));
13 MOCK_METHOD(std::string,
asString, (), (
const,
override));
14 MOCK_METHOD(
bool,
isEmpty, (), (
const,
override));
15 MOCK_METHOD(std::size_t,
getSize, (), (
const,
override));
16 MOCK_METHOD((
const std::vector<std::shared_ptr<JSONElement>> &) ,
getValues, (), (
const,
override));
21 EXPECT_CALL(*mock,
getType()).WillRepeatedly(::testing::Return(tenduke::json::JSONElement::Type::ARRAY));
26 static std::shared_ptr<JSONArrayMock> createShared()
28 return std::shared_ptr<JSONArrayMock>(create());
A JSON array.
Definition JSONArray.h:16
virtual std::size_t getSize() const =0
Returns number of elements in the array.
virtual bool isEmpty() const =0
Checks if the array is empty.
virtual const std::vector< std::shared_ptr< JSONElement > > & getValues() const =0
Returns the elements of the array.
virtual enum Type getType() const =0
Returns type of this element.
virtual std::string asString() const =0
Returns string representation of this element.
Type
Type of the element.
Definition JSONElement.h:17
Definition JSONArrayMock.h:10
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4