Create Service, Entity and Repository for Client and Location. Client add test to BDD done
This commit is contained in:
@@ -1,13 +1,32 @@
|
||||
package fr.eni.demo;
|
||||
|
||||
import fr.eni.demo.bll.ClientService;
|
||||
import fr.eni.demo.bll.LocationService;
|
||||
import fr.eni.demo.bo.Client;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class DemoApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
@Autowired
|
||||
private ClientService clientService;
|
||||
|
||||
@Autowired
|
||||
private LocationService locationService;
|
||||
|
||||
@Test
|
||||
@DisplayName("-- Test add Client --")
|
||||
void testAddClient() {
|
||||
//Création de l'objet client
|
||||
Client client = new Client();
|
||||
client.setEmail("olivier@test.fr");
|
||||
client.setNom("Parpaillon");
|
||||
client.setPrenom("Olivier");
|
||||
|
||||
clientService.add(client);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user