mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-24 00:05:48 +00:00
Merge pull request #104 from cheapy-ispp/015-Registro-#62
015 registro #62
This commit is contained in:
commit
9ca97e5492
4 changed files with 20 additions and 8 deletions
|
@ -52,6 +52,9 @@ class FoodOfferControllerTest {
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setup() {
|
void setup() {
|
||||||
User user1 = new User();
|
User user1 = new User();
|
||||||
|
Code code1 = new Code();
|
||||||
|
code1.setActivo(true);
|
||||||
|
code1.setCode("codeTest1");
|
||||||
user1.setUsername("user1");
|
user1.setUsername("user1");
|
||||||
user1.setPassword("user1");
|
user1.setPassword("user1");
|
||||||
Client client1 = new Client();;
|
Client client1 = new Client();;
|
||||||
|
@ -63,7 +66,7 @@ class FoodOfferControllerTest {
|
||||||
client1.setFinish(LocalTime.of(01, 01));
|
client1.setFinish(LocalTime.of(01, 01));
|
||||||
client1.setTelephone("123456789");
|
client1.setTelephone("123456789");
|
||||||
client1.setDescription("client1");
|
client1.setDescription("client1");
|
||||||
client1.setCode("client1");
|
client1.setCode(code1);
|
||||||
client1.setFood("client1");
|
client1.setFood("client1");
|
||||||
client1.setUsuar(user1);
|
client1.setUsuar(user1);
|
||||||
BDDMockito.given(this.clientService.getCurrentClient()).willReturn(client1);
|
BDDMockito.given(this.clientService.getCurrentClient()).willReturn(client1);
|
||||||
|
@ -132,4 +135,4 @@ class FoodOfferControllerTest {
|
||||||
mockMvc.perform(get("/offers/food/{foodOfferId}/activate", TEST_FOODOFFER_ID+1))
|
mockMvc.perform(get("/offers/food/{foodOfferId}/activate", TEST_FOODOFFER_ID+1))
|
||||||
.andExpect(view().name("exception"));
|
.andExpect(view().name("exception"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,9 @@ class NuOfferControllerTest {
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setup() {
|
void setup() {
|
||||||
User user1 = new User();
|
User user1 = new User();
|
||||||
|
Code code1 = new Code();
|
||||||
|
code1.setActivo(true);
|
||||||
|
code1.setCode("codeTest1");
|
||||||
user1.setUsername("user1");
|
user1.setUsername("user1");
|
||||||
user1.setPassword("user1");
|
user1.setPassword("user1");
|
||||||
Client client1 = new Client();
|
Client client1 = new Client();
|
||||||
|
@ -62,7 +65,7 @@ class NuOfferControllerTest {
|
||||||
client1.setFinish(LocalTime.of(01, 01));
|
client1.setFinish(LocalTime.of(01, 01));
|
||||||
client1.setTelephone("123456789");
|
client1.setTelephone("123456789");
|
||||||
client1.setDescription("client1");
|
client1.setDescription("client1");
|
||||||
client1.setCode("client1");
|
client1.setCode(code1);
|
||||||
client1.setFood("client1");
|
client1.setFood("client1");
|
||||||
client1.setUsuar(user1);
|
client1.setUsuar(user1);
|
||||||
BDDMockito.given(this.clientService.getCurrentClient()).willReturn(client1);
|
BDDMockito.given(this.clientService.getCurrentClient()).willReturn(client1);
|
||||||
|
@ -148,4 +151,4 @@ class NuOfferControllerTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,9 @@ class SpeedOfferControllerTest {
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setup() {
|
void setup() {
|
||||||
User user1 = new User();
|
User user1 = new User();
|
||||||
|
Code code1 = new Code();
|
||||||
|
code1.setActivo(true);
|
||||||
|
code1.setCode("codeTest1");
|
||||||
user1.setUsername("user1");
|
user1.setUsername("user1");
|
||||||
user1.setPassword("user1");
|
user1.setPassword("user1");
|
||||||
Client client1 = new Client();
|
Client client1 = new Client();
|
||||||
|
@ -63,7 +66,7 @@ class SpeedOfferControllerTest {
|
||||||
client1.setFinish(LocalTime.of(01, 01));
|
client1.setFinish(LocalTime.of(01, 01));
|
||||||
client1.setTelephone("123456789");
|
client1.setTelephone("123456789");
|
||||||
client1.setDescription("client1");
|
client1.setDescription("client1");
|
||||||
client1.setCode("client1");
|
client1.setCode(code1);
|
||||||
client1.setFood("client1");
|
client1.setFood("client1");
|
||||||
client1.setUsuar(user1);
|
client1.setUsuar(user1);
|
||||||
BDDMockito.given(this.clientService.getCurrentClient()).willReturn(client1);
|
BDDMockito.given(this.clientService.getCurrentClient()).willReturn(client1);
|
||||||
|
@ -148,4 +151,4 @@ class SpeedOfferControllerTest {
|
||||||
mockMvc.perform(get("/offers/speed/{speedOfferId}/activate", TEST_SPEEDOFFER_ID+1))
|
mockMvc.perform(get("/offers/speed/{speedOfferId}/activate", TEST_SPEEDOFFER_ID+1))
|
||||||
.andExpect(view().name("exception"));
|
.andExpect(view().name("exception"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,9 @@ class TimeOfferControllerTest {
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setup() {
|
void setup() {
|
||||||
User user1 = new User();
|
User user1 = new User();
|
||||||
|
Code code1 = new Code();
|
||||||
|
code1.setActivo(true);
|
||||||
|
code1.setCode("codeTest1");
|
||||||
user1.setUsername("user1");
|
user1.setUsername("user1");
|
||||||
user1.setPassword("user1");
|
user1.setPassword("user1");
|
||||||
Client client1 = new Client();
|
Client client1 = new Client();
|
||||||
|
@ -62,7 +65,7 @@ class TimeOfferControllerTest {
|
||||||
client1.setFinish(LocalTime.of(01, 01));
|
client1.setFinish(LocalTime.of(01, 01));
|
||||||
client1.setTelephone("123456789");
|
client1.setTelephone("123456789");
|
||||||
client1.setDescription("client1");
|
client1.setDescription("client1");
|
||||||
client1.setCode("client1");
|
client1.setCode(code1);
|
||||||
client1.setFood("client1");
|
client1.setFood("client1");
|
||||||
client1.setUsuar(user1);
|
client1.setUsuar(user1);
|
||||||
BDDMockito.given(this.clientService.getCurrentClient()).willReturn(client1);
|
BDDMockito.given(this.clientService.getCurrentClient()).willReturn(client1);
|
||||||
|
@ -138,4 +141,4 @@ class TimeOfferControllerTest {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue