If each test only needs to have read access then you can share the read-only file between each execution by defining the FileAccess
and FileShare
constants.
string path = "./filepath";
FileParameter file = new(new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read));
_ = await SomeFunction(file);
file.Data.Close();