hello I'm a little bit new in c# and WPF. I'm following a tutorial and I found this code which contain unit test with event can you explain it to me :
`[TestClass]
class ObservableObjectTests
{
[TestMethod]
public void PropertyChangedEventHandlerIsRaised()
{
var obj = new SubObservableObject();
bool raised = false;
obj.PropertyChanged += (Sender, e) =>
{
Assert.IsTrue(e.PropertyName == "ChangedProperty");
raised = true;
};
}
}`
thank you
Aucun commentaire:
Enregistrer un commentaire