public static IDataNode Build() => new BuilderFor.DataNodeSubstitute { Edges = new List <IEdge> { new BuilderFor.EdgeSubstitute <Class> { ChildNode = new BuilderFor.ListNodeSubstitute <TreeWithHeight1.Class> { ChildNode = TreeWithHeight1.Build(), }.Build(), ChildExtractor = value => value.List1, ChildSetter = (value, childValue) => value.List1 = (IList <TreeWithHeight1.Class>)childValue }.Build(), new BuilderFor.EdgeSubstitute <Class> { ChildNode = new BuilderFor.ListNodeSubstitute <TreeWithHeight2.Class> { ChildNode = TreeWithHeight2.Build() }.Build(), ChildExtractor = value => value.List2, ChildSetter = (value, childValue) => value.List2 = (IList <TreeWithHeight2.Class>)childValue }.Build() } } .Build();
public static IDataNode Build() => new BuilderFor.DataNodeSubstitute { Edges = new List <IEdge> { new BuilderFor.EdgeSubstitute <Class> { ChildNode = new BuilderFor.DataNodeSubstitute().Build(), ChildExtractor = value => value.Long, ChildSetter = (value, childValue) => value.Long = (long)childValue }.Build(), new BuilderFor.EdgeSubstitute <Class> { ChildNode = TreeWithHeight1.Build(), ChildExtractor = value => value.Child, ChildSetter = (value, childValue) => value.Child = (TreeWithHeight1.Class)childValue }.Build() } } .Build();