System.IO.Abstractions usage

10,364

yes, in the production code, you should inject an instance of System.IO.Abstractions.FileSystem. In your test code an instance of System.IO.Abstractions.TestingHelpers.MockFileSystem.

Share:
10,364
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    I'm writing some unit tests using System.IO.Abstractions following the sample code in GitHub and got stuck here:

    fileSystem: new FileSystem() //use default implementation which calls System.IO
    

    This line is meant to initialise System.IO.FileSystem but that class does not exist... do you know if it has been deprecated or am I getting this wrong?

    Thanks!