Create Service, Entity and Repository for Client and Location. Client add test to BDD done

This commit is contained in:
Olivier PARPAILLON
2025-07-09 10:00:21 +02:00
parent c226657ca6
commit b2fffa9f9f
11 changed files with 158 additions and 11 deletions

View File

@@ -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);
}
}