You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation should be improved by separating, for each target (FileIO and Filesystem), the functions that are purely wrappers from those that add logic.
This approach makes the code more modular, allowing file_helper functions that contain logic to be tested using the same library's wrapper mocks, thus avoiding duplicate mocks.
Keep in mind that there are some files where filesystem_wrapper functions might be used, such as in file_op.c. Adding the necessary wrappers (e.g., FileSize, w_copy_file, etc.).
The implementation of tests that manipulate the real filesystem should be improved by using these mocks, for example in the instance_handler tests and filesystem_wrapper tests.
The text was updated successfully, but these errors were encountered:
The implementation should be improved by separating, for each target (FileIO and Filesystem), the functions that are purely wrappers from those that add logic.
This can be done as follows:
This approach makes the code more modular, allowing file_helper functions that contain logic to be tested using the same library's wrapper mocks, thus avoiding duplicate mocks.
Keep in mind that there are some files where filesystem_wrapper functions might be used, such as in file_op.c. Adding the necessary wrappers (e.g., FileSize, w_copy_file, etc.).
The implementation of tests that manipulate the real filesystem should be improved by using these mocks, for example in the instance_handler tests and filesystem_wrapper tests.
The text was updated successfully, but these errors were encountered: