Create object hierarchy for test
问题 I building a test-driven application that will sort a flat file into a parent-child-hierarchy. And now I want to create a pretty generic test for my own sorting. For that I want to generate some test data, which I then sort. The object that will be sorted will look something like this: public interface IHierarchicalUnitWithChildren { string Id { get; } string ParentId { get; } IList<IHierarchicalUnitWithChildren> Children { get; set; } } But I don't want to create the test-object myself. I