Created
April 24, 2018 12:59
-
-
Save denispeyrusaubes/f24ad11ef63f9e376286b5229c9af8be to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.retengr.Exercice2JPA; | |
| import com.retengr.main.Main; | |
| import com.retengr.model.Client; | |
| import com.retengr.service.BanqueService; | |
| import org.junit.Test; | |
| import org.junit.runner.RunWith; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.test.context.SpringBootTest; | |
| import org.springframework.test.context.junit4.SpringRunner; | |
| import java.util.List; | |
| @RunWith(SpringRunner.class) | |
| @SpringBootTest(classes = {Main.class}) | |
| public class Exercice2JpaApplicationTests { | |
| @Autowired | |
| private BanqueService banqueService; | |
| @Test | |
| public void creationCompte() { | |
| Client c = new Client("Durand","Pierre"); | |
| banqueService.ajouteClient(c); | |
| List<Client> clients = banqueService.getClients(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment