vendredi 23 août 2019

How to embed every test in a wrapper logic?

Given the requirement that every junit test have to run in the following wrapper:

 @Test
  public void testFooBar() {
SpecialLogic.runWith(new SpecialLogic("blah", "foo", ANYTHING), () -> {
        // my test 
});
}

I am trying to avoid adding SpecialLogic.runWith(...) for each test.

Is there any possibility by using @BeforeEach or any other way?

Aucun commentaire:

Enregistrer un commentaire