public void TestConstructionWithNullObject() { var obj = new ClassWithNullObject(); var container = new NodeContainer(); var node = (GraphNode)container.GetOrCreateNode(obj); Helper.PrintModelContainerContent(container, node); // TODO: Asserts regarding the status of the null value // Run the consistency check to verify construction. Helper.ConsistencyCheck(container, obj); }
public void TestConstructionWithNullObject() { var obj = new ClassWithNullObject(); var container = new ModelContainer(); var node = (ModelNode)container.GetOrCreateModelNode(obj, obj.GetType()); Console.WriteLine(node.PrintHierarchy()); var visitor = new ModelConsistencyCheckVisitor(container.NodeBuilder); visitor.Check(node, obj, typeof(ClassWithNullObject), true); foreach (var viewModel in container.Models) { visitor.Check((ModelNode)viewModel, viewModel.Content.Value, viewModel.Content.Type, true); Console.WriteLine(viewModel.PrintHierarchy()); } }