Buda Gavril
Buda Gavril

Reputation: 21657

Assert that a method from System.IO.Fakes was called

I have a legacy class that we can't refactor now and inside it's using classes from System.IO (checks if a file exists, check if a directory exists, creates a directory, etc) and we need to create unit tests for this class. I've added System.Fakes and I was wondering if there is a method to assert that inside the class the method Directory.Exists was called, for example or Directory.CreateDirectory was called with a certain parameter. These calls are internals.

Upvotes: 0

Views: 135

Answers (0)

Related Questions