|
using System.Collections.Generic;
using System.ComponentModel;
namespace CodeProject.VisualStudio.QualityTools.UnitTestFramework
{
public static class PropertyChangedWatcherExtensions
{
public static PropertyChangedEventArgs ShouldHaveSeen(this SpecificationValue<PropertyChangedWatcher> self,
string propertyName)
{
return ShouldHaveSeen(self, propertyName, string.Empty, null);
}
public static PropertyChangedEventArgs ShouldHaveSeen(this SpecificationValue<PropertyChangedWatcher> self,
string propertyName, string message)
{
return ShouldHaveSeen(self, propertyName, message, null);
}
public static PropertyChangedEventArgs ShouldHaveSeen(this SpecificationValue<PropertyChangedWatcher> self,
string propertyName, string message, params object[] parameters)
{
PropertyChangedEventArgs found;
IEnumerator<PropertyChangedEventArgs> enumerator = self.Value.Find(propertyName);
if (!enumerator.MoveNext())
Specify.Fail("ShouldHaveSeen", string.Empty, message, parameters);
found = enumerator.Current;
if (enumerator.MoveNext())
Specify.Fail("ShouldHaveSeen", string.Empty, message, parameters);
return found;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Windows developer with 10+ years experience working in the banking industry.