public void CollectViewModel_TwoWay_AttachedProperty() { var textBox = new TextBox(); var reference = DoCollectViewModel_TwoWay_AttachedProperty(textBox); TestUtils.GarbageCollect(); Assert.That(reference.IsAlive, Is.True); textBox.ClearDataContext(); TestUtils.GarbageCollect(); Assert.That(reference.IsAlive, Is.False); }