diff --git a/src/main/java/it/cnr/isti/epasmed/sync/SyncService.java b/src/main/java/it/cnr/isti/epasmed/sync/SyncService.java index 2400df7..bcd9fdb 100755 --- a/src/main/java/it/cnr/isti/epasmed/sync/SyncService.java +++ b/src/main/java/it/cnr/isti/epasmed/sync/SyncService.java @@ -1293,7 +1293,7 @@ public class SyncService { tab.setIdFlusso(fluxId); tab.setLastUpdate(now); tabsSIService.updateTabsSI(tab); - + } private TimeCardsReporting createTimeCardReporting(Long fluxId, String year, String month, LocalDateTime now) { diff --git a/src/test/java/it/cnr/isti/epasmed/web/rest/sync/SyncResourceIT.java b/src/test/java/it/cnr/isti/epasmed/web/rest/sync/SyncResourceIT.java index 380e397..1436557 100755 --- a/src/test/java/it/cnr/isti/epasmed/web/rest/sync/SyncResourceIT.java +++ b/src/test/java/it/cnr/isti/epasmed/web/rest/sync/SyncResourceIT.java @@ -28,18 +28,16 @@ import it.cnr.isti.epasmed.security.AuthoritiesConstants; 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 YEAR = "2022"; + private static final String MONTH = "7"; + private static final String PERSON_DEFAULT_FISCAL_CODE = "CSTDTL57L65A864M"; - @Autowired private MockMvc restSyncMockMvc; @Autowired private Environment environment; - - @BeforeEach public void initTest() { for (String profileName : environment.getActiveProfiles()) { @@ -50,40 +48,36 @@ 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 public void syncWrites() throws Exception { - restSyncMockMvc.perform(get("/api/sync/writes?year="+YEAR+"&month="+MONTH)) - .andExpect(status().is2xxSuccessful()); + restSyncMockMvc.perform(get("/api/sync/writes?year=" + YEAR + "&month=" + MONTH)) + .andExpect(status().is2xxSuccessful()); } - + @Test public void syncTest() throws Exception { - restSyncMockMvc.perform(get("/api/sync/test?year="+YEAR+"&month="+MONTH)) - .andExpect(status().is2xxSuccessful()); + restSyncMockMvc.perform(get("/api/sync/test?year=" + YEAR + "&month=" + MONTH)) + .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 public void syncWritesTimeCards() throws Exception { - restSyncMockMvc.perform(get("/api/sync/writesTimeCards?year="+YEAR+"&month="+MONTH)) - .andExpect(status().is2xxSuccessful()); + restSyncMockMvc.perform(get("/api/sync/writesTimeCards?year=" + YEAR + "&month=" + MONTH)) + .andExpect(status().is2xxSuccessful()); } - + @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)); } - - + }