Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Test and Mock framework for Java and .NET

I'd like to know your thoughts about test/mocking frameworks that are widely used and have a good level of compatibility between Java and .NET. I mean, I want to learn those tools to use in a .NET project, but I still wanna be able to apply that knowledge in Java projects.

  • I know there're many questions about test/mocking frameworks to those platforms especifically here in SO, but I've not found one question comparing those frameworks regarding its similarities in those two platforms.
like image 849
gsb Avatar asked Nov 30 '22 20:11

gsb


2 Answers

The N/J-series of frameworks (NUnit/JUnit, NMock/JMock, etc.) are typically parallel ports of each other or are based on the same starting principles. Those will definitely let you transfer at least some of your knowledge between them.

like image 105
John Feminella Avatar answered Dec 06 '22 20:12

John Feminella


I would suggest that you take a look at Moq for mocking in .NET. It is conceptually very similar to Mockito on the Java side.

like image 28
Petter Wigle Avatar answered Dec 06 '22 18:12

Petter Wigle