NUnit / Testdriven.Net conflicting results.
Posted
by panamack
on Stack Overflow
See other posts from Stack Overflow
or by panamack
Published on 2010-04-28T12:59:54Z
Indexed on
2010/04/28
13:03 UTC
Read the original article
Hit count: 334
nunit
|TestDriven.NET
When I run this test in NUnit = Red Bar.
[Test]
public void ChangingValueViaPropertyDescriptorRaisesPropertyChangedNotification()
{
PropertyChangedEventArgs pCEventArgs = null;
subjectVM.PropertyChanged += (sender, e) => { pCEventArgs = e; };
PropertyDescriptor descriptor = subjectVM.GetProperties().Find(schoolMeta.Name, false);
descriptor.SetValue(null, "School's out for summer.");
Assert.IsNotNull(pCEventArgs);
Assert.AreEqual("School", pCEventArgs.PropertyName);
}
However, when I run this test from within Visual Studio with Test Driven .Net it passes.
When it fails with NUnit it's because PropertyChanged is null, subjectVM is a View Model classes that inherits PropertyChanged from a base class.
Am I to blame, or am I looking at a NUnit bug?
© Stack Overflow or respective owner