Skip to content

Commit

Permalink
Handle FeedBacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Zheng-Li01 committed Sep 24, 2024
1 parent 8c23324 commit 18af4ce
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class ToolStripLabelTests : IDisposable
[WinFormsFact]
public void ToolStripLabel_DefaultConstructor_SetsDefaults()
{
ToolStripLabel toolStripLabel = new();
using ToolStripLabel toolStripLabel = new();

toolStripLabel.Text.Should().BeEmpty();
toolStripLabel.Image.Should().BeNull();
Expand All @@ -27,7 +27,7 @@ public void ToolStripLabel_ConstructorWithText_SetsText()
{
string text = "Test Label";

ToolStripLabel toolStripLabel = new(text);
using ToolStripLabel toolStripLabel = new(text);

toolStripLabel.Text.Should().Be(text);
toolStripLabel.Image.Should().BeNull();
Expand All @@ -39,7 +39,7 @@ public void ToolStripLabel_ConstructorWithImage_SetsImage()
{
using Bitmap image = new(10, 10);

ToolStripLabel toolStripLabel = new(image);
using ToolStripLabel toolStripLabel = new(image);

toolStripLabel.Image.Should().Be(image);
toolStripLabel.Text.Should().BeNull();
Expand All @@ -52,7 +52,7 @@ public void ToolStripLabel_ConstructorWithTextAndImage_SetsTextAndImage()
using Bitmap image = new(10, 10);
string text = "Test Label";

ToolStripLabel toolStripLabel = new(text, image);
using ToolStripLabel toolStripLabel = new(text, image);

toolStripLabel.Text.Should().Be(text);
toolStripLabel.Image.Should().Be(image);
Expand All @@ -66,7 +66,7 @@ public void ToolStripLabel_ConstructorWithTextImageAndIsLink_SetsTextImageAndIsL
string text = "Test Label";
bool isLink = true;

ToolStripLabel toolStripLabel = new(text, image, isLink);
using ToolStripLabel toolStripLabel = new(text, image, isLink);

toolStripLabel.Text.Should().Be(text);
toolStripLabel.Image.Should().Be(image);
Expand All @@ -82,7 +82,7 @@ public void ToolStripLabel_ConstructorWithTextImageIsLinkAndOnClick_SetsTextImag
bool eventHandlerCalled = false;
EventHandler onClick = (sender, e) => eventHandlerCalled = true;

ToolStripLabel toolStripLabel = new(text, image, isLink, onClick);
using ToolStripLabel toolStripLabel = new(text, image, isLink, onClick);

toolStripLabel.Text.Should().Be(text);
toolStripLabel.Image.Should().Be(image);
Expand Down

0 comments on commit 18af4ce

Please sign in to comment.