mercredi 29 juin 2016

EventHub PartitionContext Class Design

I am trying to test my implementation of the IEventProcessor. However, I am having a hard time, because it is impossible to actually mock the PartitionContext class (http://ift.tt/295i7Dn).

For example, I can not verify if the CheckpointAsync() method has been called correctly, because the ICheckpointer interface is internal and the actual method is not virtual. Furthermore, I can not inject my own ICheckpointManager instance, because the constructor which allows this, is internal.

What is the design decisions in making everything internal, which would allow me to mock this class?

Either this is really bad design or I am missing something.

Aucun commentaire:

Enregistrer un commentaire