A lot of the development we’ve been doing here at GojiSoft has involved event driven component development. This four part article describes how we went about developing a generalized event testing framework to more easily write unit tests that codified event firing sequences.
Continue reading 'Event Sequence Unit Testing – Conclusion'»
A lot of the development we’ve been doing here at GojiSoft has involved event driven component development. This four part article describes how we went about developing a generalized event testing framework to more easily write unit tests that codified event firing sequences.
Continue reading 'Event Sequence Unit Testing – Part 4'»
A lot of the development we’ve been doing here at GojiSoft has involved event driven component development. This four part article describes how we went about developing a generalized event testing framework to more easily write unit tests that codified event firing sequences.
Continue reading 'Event Sequence Unit Testing – Part 3'»
A lot of the development we’ve been doing here at GojiSoft has involved event driven component development. This four part article describes how we went about developing a generalized event testing framework to more easily write unit tests that codified event firing sequences.
Continue reading 'Event Sequence Unit Testing – Part 2'»
A lot of the development we’ve been doing here at GojiSoft has involved event driven component development. We didn’t like the endless boiler plate unit test code that we had to write to unit test classes that raise events, so we came up with a few helper classes that make it effortless. A test now looks like this:
[Test]
public void TestEventRaisingSequence()
{
var myClass = new MyEventRaisingClass();
Action test = () => { myClass.RaiseA(); myClass.RaiseB(); };
var expectedSequence = new[] { "EventA", "EventB" };
EventMonitor.Assert(test, myClass, expectedSequence);
}
The framework handles synchronous & asynchronous event raising, as well as property change notification (INotifyPropertyChanged).
Continue reading 'Event Sequence Unit Testing – Part 1'»