I have a unit test that is written to test a small method that contains a call to ReadFileBinary. The test mocks out another component that is responsible for returning a filepath for ReadFileBinary and instead returns a dummy path. However, the test fails because the file doesn’t actually exist.
Is it possible to mock calls to built in functions via MockBox, and if not has anyone found an elegant way to handle any similar cases? I know I could create a dummy file that the dummy path points to but this means all the other developers on the team would need to do the same and I would prefer to avoid that since the purpose of the test is not to ensure ReadFileBinary works.
Thanks,
Ryan