public void Discover() { DiscoverableParent parent = new DiscoverableParent(); IList <IDiscoverableChild> list = Discoverer.Discover <IDiscoverableChild>(parent); Assert.Equal(3, list.Count); }
public void DiscoverSelfReferential() { DiscoverableParent parent = new DiscoverableParent(); parent.Parent = new DiscoverableParent(); IList <IDiscoverableParent> list = Discoverer.Discover <IDiscoverableParent>(parent); Assert.Equal(2, list.Count); parent.Parent = parent; list = Discoverer.Discover <IDiscoverableParent>(parent); Assert.Equal(1, list.Count); }