Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am writing integration tests to ensure files are getting created and written to etc but this seems like something lots of people must have done previously.

Are there any libraries that have a bunch of integration tests already written or that have an API

share|improve this question

1 Answer

You don't need a library to do this, as C# makes it very easy. You can either write the integration tests to interact with the real file structure or you can take the more common approach of mocking the writing of a file.

share|improve this answer
I am interacting with the filesystem myself but I'm checking things like valid file names and checking exceptions get thrown. Surely this must have been written before by a lot of people – Jon Mar 27 '12 at 13:02
I'm just saying you don't need to search for a library to do this type of simple integration testing. You can just use built-in C# functionality like the Debug.Assert Method to validate expected behavior. – CFL_Jeff Mar 27 '12 at 13:11
I know but I dont want to rewrite tests that loads of people must have done previously – Jon Mar 27 '12 at 13:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.