mirror of https://github.com/AMT-Cheif/Stylet.git
Remove tests which were no longer relevant, since Bind/BindWeak refactor
This commit is contained in:
parent
c8e5ef3715
commit
afe8b9c20f
|
@ -84,22 +84,6 @@ namespace StyletUnitTests
|
|||
Assert.AreEqual("bar", newVal);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void StrongBindingRetainsBindingClass()
|
||||
{
|
||||
var binding = new BindingClass();
|
||||
|
||||
// Means of determining whether the class has been disposed
|
||||
var weakBinding = new WeakReference<BindingClass>(binding);
|
||||
|
||||
var notifying = new NotifyingClass();
|
||||
binding.BindStrong(notifying);
|
||||
|
||||
binding = null;
|
||||
GC.Collect();
|
||||
Assert.IsTrue(weakBinding.TryGetTarget(out binding));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void StrongBindingDoesNotRetainNotifier()
|
||||
{
|
||||
|
@ -180,23 +164,6 @@ namespace StyletUnitTests
|
|||
Assert.IsFalse(weakBinding.TryGetTarget(out binding));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WeakBindingRetainsClassIfIPropertyChangedBindingRetained()
|
||||
{
|
||||
var binding = new BindingClass();
|
||||
|
||||
// Means of determining whether the class has been disposed
|
||||
var weakBinding = new WeakReference<BindingClass>(binding);
|
||||
|
||||
var notifying = new NotifyingClass();
|
||||
// Retain this
|
||||
var binder = binding.BindWeak(notifying);
|
||||
|
||||
binding = null;
|
||||
GC.Collect();
|
||||
Assert.IsTrue(weakBinding.TryGetTarget(out binding));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WeakBindingDoesNotRetainNotifier()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue