public void Dependencies_Chain_Through_The_Graph() { var viewModel = new Chained_Dependencies(); List <string> propertiesChanged = new List <string>(); viewModel.PropertyChanged += (s, e) => propertiesChanged.Add(e.PropertyName); viewModel.InputA = 5; Assert.That(propertiesChanged.Count, Is.EqualTo(3)); Assert.That(propertiesChanged[0], Is.EqualTo("InputA")); Assert.That(propertiesChanged[1], Is.EqualTo("InputASquared")); Assert.That(propertiesChanged[2], Is.EqualTo("InputASquaredOutput")); }
public void Dependencies_Chain_Through_The_Graph() { var viewModel = new Chained_Dependencies(); List<string> propertiesChanged = new List<string>(); viewModel.PropertyChanged += (s, e) => propertiesChanged.Add(e.PropertyName); viewModel.InputA = 5; Assert.That(propertiesChanged.Count, Is.EqualTo(3)); Assert.That(propertiesChanged[0], Is.EqualTo("InputA")); Assert.That(propertiesChanged[1], Is.EqualTo("InputASquared")); Assert.That(propertiesChanged[2], Is.EqualTo("InputASquaredOutput")); }