dokan-dev / dokan-dotnet

Dokan DotNet Wrapper
http://dokan-dev.github.io
MIT License
462 stars 116 forks source link

IDokanFileInfo is now the final parameter for IDokanOperations(Unsafe). #244

Closed kyanha closed 5 years ago

kyanha commented 5 years ago

THIS IS A BREAKING CHANGE.

All implementations of IDokanOperations will need to change their final parameters to accept IDokanFileInfo instead of bare DokanFileInfo.

New class: MockDokanFileInfo This is accepted by implementations of IDokanOperations and IDokanOperationsUnsafe as their final parameters. You can set all of the values of the public interfaces of IDokanFileInfo (which itself was extracted from the publicly accessible fields of DokanFileInfo), and specify the mock behavior of both .TryResetTimeout() and .GetRequestor().

To use this, your mock code needs to behave as though it is Dokan, calling into your IDokanOperations implementation with various parameters and testing the expected behaviors and return values.

kyanha commented 5 years ago

Supersedes #239

Liryna commented 5 years ago

Thank you very much @kyanha for your PR 👍