Skip to content

Commit

Permalink
fix(icon-handling) - Add test for ToImageSource extension method to c…
Browse files Browse the repository at this point in the history
…heck if the icon handle is properly diposed
  • Loading branch information
lilla28 committed May 3, 2024
1 parent b95788b commit 35332f0
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ public void Bitmap_handle_is_no_longer_held_after_it_has_been_disposed()
var action1 = () => bitmap.GetHbitmap();
var action2 = () => bitmap.GetHicon();
var action3 = () => icon.Handle;
var action4 = () => result;

action1.Should().Throw<ArgumentException>();
action2.Should().Throw<ArgumentException>();
action3.Should().Throw<ObjectDisposedException>();
action4.Should().NotThrow();
}
}

0 comments on commit 35332f0

Please sign in to comment.