Skip to content

feat: Add temp path overload for DisposableFileSystem extensions#63

Merged
gigi81 merged 1 commit intoTestableIO:mainfrom
MattKotsenas:feature/disposable-temp-factory
Feb 26, 2024
Merged

feat: Add temp path overload for DisposableFileSystem extensions#63
gigi81 merged 1 commit intoTestableIO:mainfrom
MattKotsenas:feature/disposable-temp-factory

Conversation

@MattKotsenas
Copy link
Contributor

The CreateDisposableFile / CreateDisposableDirectory extensions provide two overloads, one automatically creates a subdirectory under %TEMP%, and the other takes a string.

However, the overload that accepts a disposable factory only has one overload that requires a path. In order to make using the extension with custom disposables easier, also provide an overload that automatically creates a subdirectory under %TEMP%.

Also updated unit tests to cover the functionality.

@MattKotsenas MattKotsenas changed the title Add temp path overload for DisposableFileSystem extensions feat: Add temp path overload for DisposableFileSystem extensions Feb 21, 2024
@gigi81
Copy link
Collaborator

gigi81 commented Feb 24, 2024

Hi @MattKotsenas
Ok for the new overloads. As for the tests, are you sure we are covering all the old and new overloads? Seems to me there are no new tests in the PR but just a refactoring of existing tests? Can you please let me know? Thanks

@MattKotsenas
Copy link
Contributor Author

Hi there!

The new 3 parameter overloads call the old 4 parameter overloads, so from a coverage perspective they are covered.

From a pedantic perspective, we could add a test to make sure the path parameter is used (e.g. theoretically a future change could ignore path and always use temp). The old tests didn't assert that either, but I'm happy to add a new test that does.

Let me know what you prefer!

@gigi81
Copy link
Collaborator

gigi81 commented Feb 26, 2024

agreed. thanks. merging now.

@gigi81 gigi81 merged commit 6282495 into TestableIO:main Feb 26, 2024
@MattKotsenas MattKotsenas deleted the feature/disposable-temp-factory branch February 26, 2024 21:41
@github-actions
Copy link

github-actions bot commented Mar 1, 2024

This is addressed in release v2.2.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants