Hi,
I am using Isolator++ Professional (v 4.1.3.0) for a VC++ Project , I have defined some test cases those are executing without error in <debug> build, if I am trying to run then in <Release> build I am getting the following error:
Assert failed. The function public: int __thiscall jobClass::getNumberOfStages() is too small to be faked. Please consider testing it in debug mode.
The method jobClass::getNumberOfStages() is a very simple single line method it returns the count of stages from CTypedPtrList<>.Count(), and getting same error for few more cases where it returns a single property value.
TEST_METHOD(sendStagePlanToPSW_Test)
{
Net_Plan_Type plan;
int stageCount = 20;
blenderJobClass* jobDesignFake = FAKE<blenderJobClass>(FakeOptions::CallOriginal);
blenderExtendedStageClass* stagePtrFake = FAKE<blenderExtendedStageClass>(FakeOptions::CallOriginal);
BlenderTruckStage* blenderTruckStageFake = FAKE<BlenderTruckStage>(FakeOptions::CallOriginal);
WHEN_CALLED(jobDesignFake->getNumberOfStages()).Return(stageCount);
WHEN_CALLED(blenderTruckStageFake->getJobDesignStagePtr(_)).Return(stagePtrFake);
ISOLATOR_SET_VARIABLE(blenderTruckStageFake, jobDesign, jobDesignFake);
try
{
int retCount = blenderTruckStageFake->sendStagePlanToPSW(&plan);
Assert::IsTrue(stageCount == retCount);
Assert::IsTrue(plan.total_stages == stageCount + 1);
}
catch(exception ex)
{
CString msg = ex.what();
Logger::WriteMessage(msg);
Assert::IsTrue(false);
}
}