I’ve two questions.
- Does it make sense to check that an occasion is not going to be fired?
- If sure, what’s the easiest way to perform that utilizing the
xUnit
framework?
For instance I’ve a category with a single property Mark
,
public class Field : INotifyPropertyChanged
{
non-public Marking mark = Marking.None;
public Marking Mark
{
get
{
return mark;
}
set
{
mark = worth;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Mark)));
}
}
public occasion PropertyChangedEventHandler PropertyChanged;
}
and I need to check that when somebody goes to set the worth of Mark
to the identical worth because the property factors presently, then the PropertyChanged
occasion is not going to be fired.