Skip to content

Commit 71395b3

Browse files
Address PR review comments: clarify test name and comments
1 parent bd1fc0b commit 71395b3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Controls/tests/Xaml.UnitTests/Issues/Maui29459.xaml.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,9 @@ public void SwitchingBindingAfterModifyingValueTriggersPropertyChanged([Values]
220220
}
221221

222222
[Test]
223-
public void SwitchingBindingToSameValueDoesNotTriggerPropertyChanged([Values] XamlInflator inflator)
223+
public void SwitchingBindingToSameValueMaintainsCorrectValue([Values] XamlInflator inflator)
224224
{
225-
// When switching bindings but the value remains the same,
226-
// PropertyChanged should NOT fire (optimization)
225+
// The value should be correct regardless of PropertyChanged firing behavior
227226

228227
var page = new Maui29459(inflator);
229228
var viewModel = new Maui29459ViewModel { A = 50, B = 50 }; // Same values
@@ -237,8 +236,7 @@ public void SwitchingBindingToSameValueDoesNotTriggerPropertyChanged([Values] Xa
237236
page.MyControl.SetBinding(Maui29459CustomControl.ValueProperty, nameof(Maui29459ViewModel.B));
238237

239238
Assert.That(page.MyControl.Value, Is.EqualTo(50), "Value should remain 50");
240-
// Note: PropertyChanged may or may not fire when values are equal - this is implementation-dependent
241-
// The key assertion is that the Value is correct
239+
// PropertyChangedCount behavior is implementation-defined when values are equal; no assertion is made.
242240
}
243241
}
244242
}

0 commit comments

Comments
 (0)