Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save denispeyrusaubes/f24ad11ef63f9e376286b5229c9af8be to your computer and use it in GitHub Desktop.

Select an option

Save denispeyrusaubes/f24ad11ef63f9e376286b5229c9af8be to your computer and use it in GitHub Desktop.
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