Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BICBridgeGRPCService Testing Methods Development #33

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions gRPC/BICgRPCServer/cmake/build/MockIImplant.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "MockIImplant.h"

MockIImplant::MockIImplant() {};
MockIImplant::~MockIImplant() {};
33 changes: 33 additions & 0 deletions gRPC/BICgRPCServer/cmake/build/MockIImplant.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#pragma once

#include <cppapi/IImplant.h>
#include <cppapi/IImplantListener.h>
#include <cppapi/IStimulationCommand.h>
#include "gtest/gtest.h"
#include "gmock/gmock.h"



class MockIImplant : public cortec::implantapi::IImplant {
public:
MockIImplant();
virtual ~MockIImplant();
MOCK_METHOD(void, registerListener, (cortec::implantapi::IImplantListener* listener), (override));
MOCK_METHOD(cortec::implantapi::CImplantInfo*, getImplantInfo, (), (const, override));
MOCK_METHOD(void, startMeasurement, (const std::set<uint32_t>& refChannels,
const cortec::implantapi::RecordingAmplificationFactor amplificationFactor,
const bool useGndElectrode), (override));
MOCK_METHOD(void, stopMeasurement, (), (override));
MOCK_METHOD(double, getImpedance, (const uint32_t channel), (override));
MOCK_METHOD(double, getTemperature, (), (override));
MOCK_METHOD(double, getHumidity, (), (override));
MOCK_METHOD(bool, isStimulationCommandValid, (const cortec::implantapi::IStimulationCommand* cmd, std::string* message), (override));
MOCK_METHOD(std::vector<cortec::implantapi::IStimulationCommand::StimulationCommandFault>, enqueueStimulationCommand, (const cortec::implantapi::IStimulationCommand* cmd, const cortec::implantapi::StimulationMode mode), (override));
MOCK_METHOD(void, startStimulation, (const uint8_t stimulationFunctionID), (override));
MOCK_METHOD(void, startStimulation, (), (override));
MOCK_METHOD(void, stopStimulation, (), (override));
MOCK_METHOD(void, setImplantPower, (const bool enabled), (override));
MOCK_METHOD(void, pushState, (), (override));
MOCK_METHOD(void, setRFQualityPolling, (const bool enable), (override));

};
5 changes: 5 additions & 0 deletions gRPC/BICgRPCServer/cmake/build/MockIImplantFactory.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

#include "MockIImplantFactory.h"


MockIImplantFactory::~MockIImplantFactory() {};
21 changes: 21 additions & 0 deletions gRPC/BICgRPCServer/cmake/build/MockIImplantFactory.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#pragma once

#include <cppapi/IImplantFactory.h>
#include <cppapi/IImplantListener.h>
#include <cppapi/IStimulationCommand.h>
#include "gtest/gtest.h"
#include "gmock/gmock.h"

class MockIImplantFactory : public cortec::implantapi::IImplantFactory
{
public:
virtual ~MockIImplantFactory();
MOCK_METHOD(std::vector<cortec::implantapi::CExternalUnitInfo*>, getExternalUnitInfos, (), (override));
MOCK_METHOD(cortec::implantapi::CImplantInfo*, getImplantInfo, (const cortec::implantapi::CExternalUnitInfo& externalUnitInfo), (override));
MOCK_METHOD(bool, isResponsibleFactory, (const cortec::implantapi::CExternalUnitInfo& externalUnitInfo), (const, override));
MOCK_METHOD(cortec::implantapi::IImplant*, create, (const cortec::implantapi::CExternalUnitInfo& externalUnitInfo, const cortec::implantapi::CImplantInfo& implantInfo), (override));
MOCK_METHOD(std::string, getLibraryVersion, (), (const, override));


};

Loading