Skip to content

Instantly share code, notes, and snippets.

@lhauspie
Created August 22, 2017 22:26
Show Gist options
  • Save lhauspie/baf58fb770c514cbd983c4d4cc79f1bf to your computer and use it in GitHub Desktop.
Save lhauspie/baf58fb770c514cbd983c4d4cc79f1bf to your computer and use it in GitHub Desktop.
Deuxieme tentative de test unitaire de la couche Repository
@SpringBootTest
@RunWith(SpringRunner.class)
public class ProductRepositoryUnitTest {
@MockBean
private MongoConverter mongoConverter;
[...]
@Test
public void searchProductTest() {
Mockito.when(mongoTemplate.getConverter())
.then(ignoredInvocation -> mongoConverter);
[...]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment