/* * Copyright (c) 2014 Eran Pe'er. * * This program is made available under the terms of the MIT License. * * Created on Mar 10, 2014 */ #pragma once #include "fakeit/StubbingProgress.hpp" #include "fakeit/StubbingImpl.hpp" #include "fakeit/StubbingContext.hpp" #include "fakeit/FakeitContext.hpp" namespace fakeit { class FakeFunctor { private: template void fake(const StubbingContext &root) { StubbingContext &rootWithoutConst = const_cast &>(root); rootWithoutConst.appendAction(new ReturnDefaultValue()); rootWithoutConst.commit(); } void operator()() { } public: template void operator()(const H &head, const M &... tail) { fake(head); this->operator()(tail...); } }; }