I'm trying to test permissions on a directory on Linux. I would expect the following to throw an UnauthorizedAccessException for /parent/child but it successfully creates the directory. Is there something I need to change to test this properly?
var fileSystem = new MockFileSystem();
fileSystem.Directory.CreateDirectory("/parent", UnixFileMode.None);
fileSystem.Directory.CreateDirectory("/parent/child");
I also tried with an AccessControlStategy but ExceptionFactory.AclAccessToPathDenied throws an IOException instead of UnauthorizedAccessException. Is that expected behavior?