#51 -- Adds tests for ImageResourceConverter#196
Merged
TheCodeTraveler merged 18 commits intoCommunityToolkit:mainfrom Nov 22, 2021
CalvinAllen:#61
Merged
#51 -- Adds tests for ImageResourceConverter#196TheCodeTraveler merged 18 commits intoCommunityToolkit:mainfrom CalvinAllen:#61
TheCodeTraveler merged 18 commits intoCommunityToolkit:mainfrom
CalvinAllen:#61
Conversation
Contributor
Author
|
I can't tell if this is due to my changes or not - I don't think so? |
TheCodeTraveler
requested changes
Nov 22, 2021
Collaborator
There was a problem hiding this comment.
Looks pretty good!
I recommend moving the initialization and disposal of Application.Current to the test class. Other tests may rely on Application, and we don't want to break them.
I also went ahead and added the [NotNullIfNotNull] attribute to ImageResourceConverter.Convert to make your casting a bit easier + cleaner in ImageResourceConverter_Tests.ImageResourceConverter.
CalvinAllen
commented
Nov 22, 2021
Collaborator
TheCodeTraveler
previously approved these changes
Nov 22, 2021
Collaborator
TheCodeTraveler
left a comment
There was a problem hiding this comment.
Love it!
Thanks @CalvinAllen!!
TheCodeTraveler
approved these changes
Nov 22, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes
Resolves the unit test portion of #61
Description
[Proposal] ImageResourceConverter #61
Detailed Solution
Unit tests to cover the ImageResouceConverter. This required mocking out the Application.Current object to allow assembly discovery to function properly for the Test project, which now has an image as an embedded resource.,