filipnavara / CodeSign

MIT License
19 stars 3 forks source link

File system abstractions? #14

Open qmfrederik opened 1 year ago

qmfrederik commented 1 year ago

I want to write unit tests for the ResourceBuilder class. It's heavily dependent on the file system, so unit testing it currently requires creating an on-disk directory structure which mimics a Bundle.

I've used System.IO.Abstractions (not a Microsoft package) in the past. It allows you to abstract away (and mock) the file system.

It would require making CodeSign dependent on System.IO.Abstractions so wanted to check with you first.

filipnavara commented 1 year ago

I took a brief look at the package and it seems reasonable to use it. In my projects I always resorted to creating temporary folder in the unit test and setting up the test data inside it, but if it makes the life easier than definitely go for it.