public void Should_do() { var parent = new CyclicParentViewModel(); var child = new CyclicChildViewModel(parent); parent.SubViewModel = child; AssociationTracker.AddAssociated(parent, child); AssociationTracker.AddAssociated(child, parent); ViewModelConventions.LocateViewModelTypes = () => new[] {typeof (CyclicParentViewModel), typeof (CyclicChildViewModel)}; PropertyDependencies.ResetDepedencyGraph(); var dependentProperties = PropertyDependencies.GetDependentProperties(parent, typeof (CyclicParentViewModel).GetProperty("FirstName")); foreach (var dependentProperty in dependentProperties) { Debug.WriteLine(dependentProperty.Item1 + "; " + dependentProperty.Item2);} }
public CyclicChildViewModel(CyclicParentViewModel parent) { Parent = parent; }