Car-Engine | Exercício C# POO
kandi X-RAY | Car-Engine Summary
kandi X-RAY | Car-Engine Summary
Exercício C# POO
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Car-Engine
Car-Engine Key Features
Car-Engine Examples and Code Snippets
Community Discussions
Trending Discussions on Car-Engine
QUESTION
I have implemented a Dependency Injection pattern in my code. I did that to be able to mock a service using gmock. The DI implementation works in production code, however, I am having trouble with my test setup. When using the EXPECT_CALL macro, I get "expression must have class type" error. I believe this is related to the way I designed the dependency, but I can't find an alternative solution (lack of experience). I have browsed previous threads on similar issues, but none helped. Would you be kind to take a look at the code below and hint possible workarounds (simplified code example using a Car-Engine interface)?
...ANSWER
Answered 2021-Feb-17 at 13:12EXPECT_CALL
expects mock object as first parameter, you pass reference to mock.
either use *mockPtr
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Car-Engine
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page