-
Notifications
You must be signed in to change notification settings - Fork 6
feat: Added GetFileNameWithoutExtension() extension method to IFileInfo #74
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi @Blaisor |
gigi81
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please apply the changes suggested. Sorry it took so long
| } | ||
|
|
||
| /// <inheritdoc cref="IPath.GetFileNameWithoutExtension(string?)"/> | ||
| public static string GetFileNameWithoutExtension(this IFileInfo file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| public static string GetFileNameWithoutExtension(this IFileInfo file) | |
| public static string NameWithoutExtension(this IFileInfo file) |
| var file = current.File(fileName); | ||
|
|
||
| //act | ||
| var name = file.GetFileNameWithoutExtension(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| var name = file.GetFileNameWithoutExtension(); | |
| var name = file.NameWithoutExtension(); |
| [TestCase("test.extension", "test")] | ||
| [TestCase("noextension", "noextension")] | ||
| [TestCase(".extensiononly", "")] | ||
| public void GetFileNameWithoutExtension_WithValidFileName_ReturnsNameWithoutExtension(string fileName, string expectedName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| public void GetFileNameWithoutExtension_WithValidFileName_ReturnsNameWithoutExtension(string fileName, string expectedName) | |
| public void NameWithoutExtension_WithValidFileName_ReturnsNameWithoutExtension(string fileName, string expectedName) |
|
|
||
| [TestCase("test.extension", "test")] | ||
| [TestCase("noextension", "noextension")] | ||
| [TestCase(".extensiononly", "")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| [TestCase(".extensiononly", "")] | |
| [TestCase(".extensiononly", "")] | |
| [TestCase("double.dot.ext", "double.dot")] |
No description provided.