Aggiornato il test per la sincronizzazione
This commit is contained in:
parent
f6135d77f5
commit
3caea5bd36
|
@ -28,9 +28,9 @@ import it.cnr.isti.epasmed.security.AuthoritiesConstants;
|
||||||
public class SyncResourceIT {
|
public class SyncResourceIT {
|
||||||
|
|
||||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
private static final String YEAR="2022";
|
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
|
@Autowired
|
||||||
private MockMvc restSyncMockMvc;
|
private MockMvc restSyncMockMvc;
|
||||||
|
@ -38,8 +38,6 @@ public class SyncResourceIT {
|
||||||
@Autowired
|
@Autowired
|
||||||
private Environment environment;
|
private Environment environment;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void initTest() {
|
public void initTest() {
|
||||||
for (String profileName : environment.getActiveProfiles()) {
|
for (String profileName : environment.getActiveProfiles()) {
|
||||||
|
@ -50,40 +48,36 @@ public class SyncResourceIT {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void syncReads() throws Exception {
|
public void syncReads() throws Exception {
|
||||||
restSyncMockMvc.perform(get("/api/sync/reads"))
|
restSyncMockMvc.perform(get("/api/sync/reads")).andExpect(status().is2xxSuccessful());
|
||||||
.andExpect(status().is2xxSuccessful());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void syncWrites() throws Exception {
|
public void syncWrites() throws Exception {
|
||||||
restSyncMockMvc.perform(get("/api/sync/writes?year="+YEAR+"&month="+MONTH))
|
restSyncMockMvc.perform(get("/api/sync/writes?year=" + YEAR + "&month=" + MONTH))
|
||||||
.andExpect(status().is2xxSuccessful());
|
.andExpect(status().is2xxSuccessful());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void syncTest() throws Exception {
|
public void syncTest() throws Exception {
|
||||||
restSyncMockMvc.perform(get("/api/sync/test?year="+YEAR+"&month="+MONTH))
|
restSyncMockMvc.perform(get("/api/sync/test?year=" + YEAR + "&month=" + MONTH))
|
||||||
.andExpect(status().is2xxSuccessful());
|
.andExpect(status().is2xxSuccessful());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void syncWritesOrario() throws Exception {
|
public void syncWritesOrario() throws Exception {
|
||||||
restSyncMockMvc.perform(get("/api/sync/writesOrario"))
|
restSyncMockMvc.perform(get("/api/sync/writesOrario")).andExpect(status().is2xxSuccessful());
|
||||||
.andExpect(status().is2xxSuccessful());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void syncWritesTimeCards() throws Exception {
|
public void syncWritesTimeCards() throws Exception {
|
||||||
restSyncMockMvc.perform(get("/api/sync/writesTimeCards?year="+YEAR+"&month="+MONTH))
|
restSyncMockMvc.perform(get("/api/sync/writesTimeCards?year=" + YEAR + "&month=" + MONTH))
|
||||||
.andExpect(status().is2xxSuccessful());
|
.andExpect(status().is2xxSuccessful());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void syncWritesOffSiteWorks() throws Exception {
|
public void syncWritesSingleTimeCards() throws Exception {
|
||||||
restSyncMockMvc.perform(get("/api/sync/writesOffSiteWorks?year="+YEAR+"&month="+MONTH))
|
restSyncMockMvc.perform(get("/api/sync/writesSingleTimeCards?year=" + YEAR + "&month=" + MONTH + "&fiscalCode="
|
||||||
.andExpect(status().is2xxSuccessful());
|
+ PERSON_DEFAULT_FISCAL_CODE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue