Skip to content

Commit

Permalink
chore: Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 authored Jan 31, 2023
1 parent da0d99e commit 507d35c
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,19 @@ public void When_Setting_Text_Null()
textBox.Text = "Rhubarb";
Assert.AreEqual("Rhubarb", textBox.Text);
Assert.AreEqual(1, callbackCount);


#if !HAS_UNO_WINUI
// Setting TextBox.Text to null throws an exception in UWP but not WinUI.
Assert.ThrowsException<ArgumentNullException>(() => textBox.Text = null);
#endif

Assert.AreEqual("Rhubarb", textBox.Text);
Assert.AreEqual(1, callbackCount);

#if HAS_UNO_WINUI
textBox.Text = null;
Assert.AreEqual("", textBox.Text);
#endif
}

[TestMethod]
Expand Down

0 comments on commit 507d35c

Please sign in to comment.