public void TestGetChildren() { var children1 = ((object)null).GetChildren <TargetMock>(); Assert.NotNull(children1); Assert.Empty(children1); var root = new RootMock(); var children2 = root.GetChildren <TargetMock>(); Assert.NotNull(children2); var array = children2.ToArray(); Assert.Equal(304, array.Length); var groups = array.GroupBy(t => t.Source).ToDictionary(g => g.Key); Assert.Equal(3, groups.Count); Assert.Contains("RootMock", groups.Keys); Assert.Contains("ChildMock", groups.Keys); Assert.Contains("EnumerableMock", groups.Keys); }
public void TestRootConstructor() { var target = new RootMock("test"); Assert.IsNotNull(target); }