1#ifndef TENDUKE_TEST_MOCKS_JSONBOOLEANMOCK_H
2#define TENDUKE_TEST_MOCKS_JSONBOOLEANMOCK_H
4#include "json/JSONBoolean.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,
getValue, (), (
const,
override));
16 static std::shared_ptr<JSONBooleanMock> createShared(
const bool value)
18 auto element = std::make_shared<JSONBooleanMock>();
19 EXPECT_CALL(*element,
getType()).WillRepeatedly(::testing::Return(JSONBoolean::BOOLEAN));
20 EXPECT_CALL(*element,
getValue()).WillRepeatedly(::testing::Return(value));
21 EXPECT_CALL(*element,
asString()).WillRepeatedly(::testing::Return(value ?
"true" :
"false"));
JSON boolean.
Definition JSONBoolean.h:12
virtual bool getValue() const =0
Returns the value.
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 JSONBooleanMock.h:10
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4