[odb-users] Unit-testing odb::result<MyClassTable>
Javier Gutierrez
javier.gutierrez at web.de
Thu Jan 25 07:06:20 EST 2018
Hi there,
first of all thank you very much for the great job.
I am in the process of unit-testing a function that calls a method that
returns odb::result<MyClassTable>.
So basically what I want is to mock that method and to return instead my
own version of an odb::result object pointing to a couple of made-up
MyClassTable objects.
I have tried to create my own version of odb::result by inheriting from
the template odb::view_result_impl, but can't figure out how to go further.
I analyzed the possibility to return std::vector instead of odb::result
and to convert from odb::result to std::vector in the real method, but
obviously that's an overkill..
Would you mind giving me any hints that points me to the right direction ?
Thanks a lot in advance,
Javier
More information about the odb-users
mailing list