-
-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ShouldExist on file or directory based objects #896
Labels
Comments
jeffkl
changed the title
Support ShouldExists on file or directory based objects
Support ShouldExist on file or directory based objects
Apr 17, 2023
elhosayny
pushed a commit
to elhosayny/shouldly
that referenced
this issue
Aug 12, 2023
Introduced new extension methods to enhance file system testing: - `ShouldExist` for both FileInfo and DirectoryInfo. - `ShouldNotExist` for both FileInfo and DirectoryInfo. These methods provide a more intuitive way to assert the existence or non-existence of files and directories. Resolves shouldly#896
elhosayny
added a commit
to elhosayny/shouldly
that referenced
this issue
Aug 12, 2023
Introduced new extension methods to enhance file system testing: - `ShouldExist` for both FileInfo and DirectoryInfo. - `ShouldNotExist` for both FileInfo and DirectoryInfo. These methods provide a more intuitive way to assert the existence or non-existence of files and directories. Resolves shouldly#896
elhosayny
added a commit
to elhosayny/shouldly
that referenced
this issue
Aug 16, 2023
Introduced new extension methods to enhance file system testing: - `ShouldExist` for both FileInfo and DirectoryInfo. - `ShouldNotExist` for both FileInfo and DirectoryInfo. These methods provide a more intuitive way to assert the existence or non-existence of files and directories. Resolves shouldly#896
elhosayny
added a commit
to elhosayny/shouldly
that referenced
this issue
Aug 16, 2023
Introduced new extension methods to enhance file system testing: - `ShouldExist` for both FileInfo and DirectoryInfo. - `ShouldNotExist` for both FileInfo and DirectoryInfo. These methods provide a more intuitive way to assert the existence or non-existence of files and directories. Resolves shouldly#896
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some of my tests expect files to exist after calling something. I have extension methods for this but I would love it to be built in.
https://github.com/jeffkl/MSBuildProjectCreator/blob/8e0a219aa7025f8c0ade8d5e10c8e917b8b8d6b4/src/Microsoft.Build.Utilities.ProjectCreation.UnitTests/ExtensionMethods.cs#L10-L31
Calling
fileInfo.Exists.ShouldBeTrue()
isn't helpful in my opinion. Having the file or directory path listed is much better.The text was updated successfully, but these errors were encountered: