Commit 75bdca43 by Antonio Rueda

Cambios menores

parent 3e59c914
...@@ -44,6 +44,7 @@ public class Cliente implements Serializable { ...@@ -44,6 +44,7 @@ public class Cliente implements Serializable {
/** Dirección del domicilio */ /** Dirección del domicilio */
@NotBlank @NotBlank
String direccion; String direccion;
/** Teléfono */ /** Teléfono */
@NotNull @NotNull
@Size(min=9, max=13) @Size(min=9, max=13)
......
...@@ -4,7 +4,7 @@ spring.datasource.url: jdbc:mysql://localhost:33060/ujacoin ...@@ -4,7 +4,7 @@ spring.datasource.url: jdbc:mysql://localhost:33060/ujacoin
spring.datasource.username: ujacoin spring.datasource.username: ujacoin
spring.datasource.password: secret spring.datasource.password: secret
spring.jpa.properties.javax.persistence.schema-generation.database.action: none spring.jpa.properties.javax.persistence.schema-generation.database.action: drop-and-create
spring.data.jpa.repositories.bootstrap-mode: default spring.data.jpa.repositories.bootstrap-mode: default
......
...@@ -69,7 +69,7 @@ public class ControladorRESTTest { ...@@ -69,7 +69,7 @@ public class ControladorRESTTest {
"jeegmail.com", "jeegmail.com",
"clave"); "clave");
TestRestTemplate restTemplate = new TestRestTemplate(restTemplateBuilder); TestRestTemplate restTemplate = new TestRestTemplate(restTemplateBuilder);
ResponseEntity<DTOCuenta> respuesta = restTemplate.postForEntity( ResponseEntity<DTOCuenta> respuesta = restTemplate.postForEntity(
"/clientes", "/clientes",
cliente, cliente,
...@@ -156,7 +156,7 @@ public class ControladorRESTTest { ...@@ -156,7 +156,7 @@ public class ControladorRESTTest {
).getBody(); ).getBody();
TestRestTemplate restTemplateAutenticado = new TestRestTemplate(restTemplateBuilder.basicAuthentication(cliente.getDni(), cliente.getClave())); TestRestTemplate restTemplateAutenticado = new TestRestTemplate(restTemplateBuilder.basicAuthentication(cliente.getDni(), cliente.getClave()));
// Acceso con credenciales del primer cliente a la información del segundo // Acceso con credenciales del primer cliente a la información del segundo
ResponseEntity<DTOCliente> respuestaLogin = restTemplateAutenticado ResponseEntity<DTOCliente> respuestaLogin = restTemplateAutenticado
.getForEntity( .getForEntity(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment