public void ItRaisesAnEventWhenIsSelectedIsSetToTrue() { var numberOfEvents = 0; var treeNode = new TreeNodeForTest(); treeNode.PropertyChanged += (s, e) => { if (e.PropertyName == "IsSelected") { numberOfEvents++; } }; treeNode.IsSelected = true; Assert.AreEqual(1, numberOfEvents); }
public void ItRaisesAnEventWhenIsSelectedIsSetToFalse() { var numberOfEvents = 0; var treeNode = new TreeNodeForTest(); treeNode.PropertyChanged += (s, e) => { if (e.PropertyName == "IsSelected") { numberOfEvents++; } }; treeNode.IsSelected = false; Assert.AreEqual(1, numberOfEvents); }