-
Notifications
You must be signed in to change notification settings - Fork 196
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
Question on using Fruit with Google Mock #25
Comments
…reporting an obscure error later on. See issue #25.
TL;DR: use You're calling
So, obligatory:
Yes, one too many in fact :-) |
Well that was a silly mistake I created for myself. Thanks for the On Aug 28, 2016 09:40, "poletti-marco" notifications@github.com wrote:
|
I recently started tinkering with using Fruit to make my code more testable and decrease the dependencies between components. I'm currently using Google Mock for mocking components but I'm not sure how to combine Fruit with Google Mock. Here is a basic sample version of what I'm trying to do and hopefully someone will be able to point out what I'm missing or misunderstanding.
The basic idea for the example is that you have a
Car
that is being modeled and it has several components but the main one for this example is theEngine
. TheEngine
provides three methods:start
,stop
, andgetNumberOfCylinders
. TheCar
provides a variety of methods but the three main ones here are thestart
,stop
,printDiagnostics
methods.Please note that for the sake of brevity I've omitted some of the basics like includes, header guards, and namespaces.
engine.hpp
v8.hpp
v8.cpp
car.hpp
saturn.hpp
saturn.cpp
mock_engine.hpp
test_saturn.cpp
This fails to compile with
No explicit binding was found for C, and C is an abstract class (so even if it has a C::Inject annotation it's ignored).
in the mock_engine class. Any pointers here?Thanks for any assistance you can give,
James
The text was updated successfully, but these errors were encountered: