public void TestContainsObject() { Product toaster = new Product {Name = "toaster"}; Shop shop = new Shop {Products = {toaster}}; ObjectGraph graph = new ObjectGraph(shop); Assert.IsTrue(graph.ContainsNode(toaster)); }
public void TestDoesNotContainObject() { Product kettle = new Product { Name = "kettle" }; Product toaster = new Product { Name = "toaster" }; Shop shop = new Shop {Products = {kettle}}; ObjectGraph graph = new ObjectGraph(shop); Assert.IsFalse(graph.ContainsNode(toaster)); }