public void Adding_Already_Parented_Control_Should_Throw() { var root1 = new TestRoot(); var root2 = new TestRoot(); var child = new Canvas(); root1.Child = child; Assert.Throws <InvalidOperationException>(() => root2.Child = child); Assert.Empty(root2.GetVisualChildren()); }