Aggiornato il test per la sincronizzazione

This commit is contained in:
Giancarlo Panichi 2022-09-21 17:22:39 +02:00
parent f6135d77f5
commit 3caea5bd36
2 changed files with 21 additions and 27 deletions

View File

@ -29,8 +29,8 @@ public class SyncResourceIT {
private final Logger log = LoggerFactory.getLogger(getClass());
private static final String YEAR = "2022";
private static final String MONTH="8";
private static final String MONTH = "7";
private static final String PERSON_DEFAULT_FISCAL_CODE = "CSTDTL57L65A864M";
@Autowired
private MockMvc restSyncMockMvc;
@ -38,8 +38,6 @@ public class SyncResourceIT {
@Autowired
private Environment environment;
@BeforeEach
public void initTest() {
for (String profileName : environment.getActiveProfiles()) {
@ -50,8 +48,7 @@ public class SyncResourceIT {
@Test
public void syncReads() throws Exception {
restSyncMockMvc.perform(get("/api/sync/reads"))
.andExpect(status().is2xxSuccessful());
restSyncMockMvc.perform(get("/api/sync/reads")).andExpect(status().is2xxSuccessful());
}
@Test
@ -66,11 +63,9 @@ public class SyncResourceIT {
.andExpect(status().is2xxSuccessful());
}
@Test
public void syncWritesOrario() throws Exception {
restSyncMockMvc.perform(get("/api/sync/writesOrario"))
.andExpect(status().is2xxSuccessful());
restSyncMockMvc.perform(get("/api/sync/writesOrario")).andExpect(status().is2xxSuccessful());
}
@Test
@ -80,10 +75,9 @@ public class SyncResourceIT {
}
@Test
public void syncWritesOffSiteWorks() throws Exception {
restSyncMockMvc.perform(get("/api/sync/writesOffSiteWorks?year="+YEAR+"&month="+MONTH))
.andExpect(status().is2xxSuccessful());
public void syncWritesSingleTimeCards() throws Exception {
restSyncMockMvc.perform(get("/api/sync/writesSingleTimeCards?year=" + YEAR + "&month=" + MONTH + "&fiscalCode="
+ PERSON_DEFAULT_FISCAL_CODE));
}
}