public void TestStaticPropertyCrash() { Product toaster = new Product { Name = "toaster" }; Shop shop = new Shop { Products = { toaster } }; ObjectGraph graph = new ObjectGraph(shop); graph.Collapse(); }
public void TestArrayOfStructsException() { TestGraph.Worker arthur = new TestGraph.Worker { Name = "Arthur", Image = new byte[] { 0, 1, 2, 3, 4, 5 } }; ObjectGraph graph = new ObjectGraph(arthur) { IncludeReferenceTypes = true }; IEnumerable<object> objects = graph.Collapse(); Assert.AreEqual(6, objects.Count(item => item is byte)); }