Custom EventListener Testing
11/07/2020
Introduction
The previous post has looked into creating custom EventCounter
s and testing them. In this post I will look into how to unit test custom in-process event listeners. The previous post has given an overview on the key classes and their behavior for event counters in .net core. Reading that post will help with the understanding of this post.
Custom EventListener
First, I will create a custom event listener, which listens for periodic updates from cpu-usage EventCounter
from System.Runtime
event source. I would like to test that the custom listener logic within this listener works as expected.