Skip to content

MockFile.ReadAllBytes returning the file contents, not a copy of them. #853

@jamesmoore

Description

@jamesmoore

return mockFileDataAccessor.GetFile(path).Contents;

If you do ReadAllBytes on a real System.IO.File you would have 2 independent copies, one on the FS and one in memory. My understanding of the linked code is that the mock would only produce one instance. Is this correct behavior or should it change? I am happy to push a PR if needed.

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