I have a design team with a main project and a test project.
When writing unit tests for a class in the main project, do you include the source file in the test project or put the path to it in the search path?
Why are you doing one above the other?
Are there any recommendations on this?
UPDATE: It seems that inclusion is the preferred option, largely due to the drawbacks of βgaining accessβ to all units in the search path, but only to accessing the units that you intend to use. However, what bothers me is to constantly include the file in two projects. Usually I support the test project as an active project, so when I need a new class, I create a new unit that will become part of the test project, but save it in the main project. Now, I have to remember to also include it in the main project. It should be "create a new block and add it to all the actions of open projects."
Vegar source
share