Using Moq framework, it is not allowed to mock a class in C# which is sealed. Same goes for many other frameworks as well. But why is it not allowed?
Mocking a class usually works by using reflection to construct a subclass which has methods and properties that do nothing (or whatever is required for the mock).
"Sealed" classes cannot be subclassed, so they cannot be mocked. If you have a sealed class X, then only instances of X will satisfy the typechecker for function parameters which require X.
make an interface, which the sealed class implements, and make functions take the interface. They can then accept mock objects as well. You do then lose some of the optimizer benefits of sealed.
unseal the class
use real objects rather than mocks, which is easier if they don't have too much behavior.