How to unit test IStorageFile? #19574
-
I am using Avalonia's |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Typically, you would use |
Beta Was this translation helpful? Give feedback.
-
You can mock using moq
|
Beta Was this translation helpful? Give feedback.
Typically, you would use
StorageProvider.TryGetFileFromPathAsync
in normal apps, when you want to get a file from a random string path.With unit tests we don't have a simpler API, but you can use these anyway, if you are running headless tests.