You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 47 Next »

Introduction

Magnolia uses JUnit 4 and if dynamic mocks are required Mockito (new) for creating unit tests. Before we were using EasyMock for dynamic mocks.

Mockito is a more recent mocking library. We'll not bulk convert existing EasyMock-Tests as this would be to big an effort. Instead we set up the following rules:

  • all new tests requiring dynamic mocks use Mockito
  • whenever you touch (fix, adapt, complete) an existing test that's using EasyMock: convert it to Mockito

Independently from that make sure your tests match our conventions. Information on how to best migrate JUnit3-style tests to JUnit4 can be found here.

 

  • No labels