How do you mock a Sealed class?

Question :

How do you mock a Sealed class?,

Answer :

can be quite a pain. I currently favor an to handle this, but something about just keeps feels weird.

So, What is the best way you mock sealed classes?

Java answers are more than welcome. In fact, I would anticipate that the Java community has been dealing with this longer and has a great deal to offer.

But here are some of the .NET opinions:


For .NET, you could use something like , which uses the profiling API and allows you to hook into calls to nearly anything.

Read More  How can I unit test Flex applications from within the IDE or a build script?

That’s the answer How do you mock a Sealed class?, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you