I am implementing an application that involves some svn functions.
I’m gonna write some unit tests for the app, however, how would you suggest I write unit tests for svn commands such as checkout, update, status, etc?
Thanks!
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.
Wrap your SVN-specific code within a class, implementing an interface. When unit testing your main application, stub/fake/mock/whatever your SVN class via the interface. You can then unit test most of your application this way.
Testing the actual SVN interaction will not be a unit test, but rather an integration test. You can write your test cases directly to your SVN implementation.