I have an project which is dependent on the another project. But now i want to create an unit test target for the main project. Is it possible? because it will be referring the files of its dependent project.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To be able to test your individual components in isolation, you need your components be loosely coupled, talking with each other only via interfaces, where possible. And you need a good architecture that regularly uses Inversion Of Control/Dependency Injection patterns everywhere. Then replacing single components with mocks or stubs or whatever is of course possible.
If you don’t have such an architecture (‘design for testability’), then you likely will run into problems when testing…
HTH.