Skip to content

Creating a filestream with FileAccess.Write returns true for CanRead using testinghelpers #610

@PaulVrugt

Description

@PaulVrugt

Describe the bug
When creating a filestream using FileAccess.Write:

_fileSystem.FileStream.Create(filePath, FileMode.CreateNew, System.IO.FileAccess.Write);

during unit testing, the property CanRead for this stream returns true, when it should be false

To Reproduce
Steps to reproduce the behavior:
use mockfilesystem, and create a file stream using:
_fileSystem.FileStream.Create(filePath, FileMode.CreateNew, System.IO.FileAccess.Write);

Expected behavior
CanRead property of the created stream returns false

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: testinghelpersIssues that address the testing helpersstate: ready to pickIssues that are ready for being worked ontype: bugIssues that describe misbehaving functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions