public void UnreachableTargetShouldNotBeLeaked() { AssertLifetime.UnreachableInstanceIsNotLeaked( () => new Entity(), entity => new DependencyPropertyAdapter(entity, Entity.SampleProperty)); }
public void ReturnedAdapterShouldNotLeakTargetGivenTargetWithDependencyProperty() { AssertLifetime.UnreachableInstanceIsNotLeaked( () => new DependencyObjectTarget(), target => ValueAdapterFactory.CreateAdapterFromPropertyName(target, "Value")); }
public void ReturnedAdapterShouldNotLeakTargetGivenTargetWithDependencyPropertyInheritedFromBaseClass() { AssertLifetime.UnreachableInstanceIsNotLeaked( () => new Control(), target => ValueAdapterFactory.CreateAdapterFromPropertyName(target, "DataContext")); }
public void ReturnedAdapterShouldNotLeakTargetGivenPropertyOfNotifyingTarget() { AssertLifetime.UnreachableInstanceIsNotLeaked( () => new NotifyingTarget(), target => ValueAdapterFactory.CreateAdapterFromPropertyName(target, "Value")); }