Open 51-code opened 1 month ago
@StrongestNumber9 please check this out
Discussed with @kortemik that an EventContextFactory can be implemented for unit testing. When producing new events with the factory, we can then call EventContextConsumer's accept() function and test the metrics by getting the Gauge's and asserting the correct value of getValue(). Later the factory can be used for testing the class's other functionality as well.
I'll start working on developing this and I will add it to the PR when ready.
Added testing for the metrics and fixed the issues that came up in the first round of review.
Made a fake object for the Output
to get rid of dependencies of the EventContextConsumer
object, and the class was refactored with a few new constructors to allow this fake to be injected. Fakes were also done for multiple objects in Azure library for creating "data" for the object, the CheckPointlessEventContextFactory
is responsible for data creation.
Ready with all the required fixes. @kortemik @StrongestNumber9
Fixes #8
Added metrics for:
Dropwizard setup was inspired by CFE-35 Router.java
Needs to be tested, but this is the initial code.
UPDATE: Tests done!