@@ -71,7 +71,7 @@ public void getOpenAPI() throws Exception {
7171 public void getCapabilities () throws Exception {
7272 mockMvc
7373 .perform (get ("/api/job-scheduling/v1/Capabilities" ))
74- // .andExpect(header().string("Content-Type", "application/json"))
74+ .andExpect (header ().string ("Content-Type" , "application/json" ))
7575 .andExpect (status ().isOk ())
7676 .andExpect (jsonPath ("$.supportsNotification" ).value (true ))
7777 .andExpect (jsonPath ("$.applicationUrl" ).value ("http://localhost:8080/launchpad.html" ));
@@ -82,7 +82,7 @@ public void getCapabilities() throws Exception {
8282 public void getJobDefinitions () throws Exception {
8383 MvcResult result = mockMvc
8484 .perform (get ("/api/job-scheduling/v1/JobDefinition" ))
85- // .andExpect(header().string("Content-Type", "application/json"))
85+ .andExpect (header ().string ("Content-Type" , "application/json" ))
8686 .andExpect (status ().isOk ())
8787 .andReturn ();
8888
@@ -308,7 +308,7 @@ public void getJobs() throws Exception {
308308
309309 MvcResult result = mockMvc
310310 .perform (get ("/api/job-scheduling/v1/Job" ))
311- // .andExpect(header().string("Content-Type", "application/json"))
311+ .andExpect (header ().string ("Content-Type" , "application/json" ))
312312 .andExpect (status ().isOk ())
313313 .andReturn ();
314314
@@ -1068,8 +1068,7 @@ public void createJobWithTranslation() throws Exception {
10681068 resultMessage = resultMessages .getJSONObject (0 );
10691069 assertEquals ("jobBasicMock" , resultMessage .getString ("code" ));
10701070 assertEquals (MessageSeverityCode .INFO , resultMessage .getString ("severity" ));
1071- // assertEquals(messageProvider.get("jobBasicMock", null, Locale.GERMAN), resultMessage.getString("text"));
1072- assertEquals ("Job läuft im einfachen Mock-Modus." , resultMessage .getString ("text" ));
1071+ assertEquals (messageProvider .get ("jobBasicMock" , null , Locale .GERMAN ), resultMessage .getString ("text" ));
10731072
10741073 jobResult = resultsArray .getJSONObject (1 );
10751074 assertEquals ("Data" , jobResult .get ("name" ));
@@ -1129,8 +1128,7 @@ public void createJobWithTranslation() throws Exception {
11291128 resultMessage = resultMessages .getJSONObject (0 );
11301129 assertEquals ("jobTestRun" , resultMessage .getString ("code" ));
11311130 assertEquals (MessageSeverityCode .INFO , resultMessage .getString ("severity" ));
1132- // assertEquals(messageProvider.get("jobTestRun", null, Locale.GERMAN), resultMessage.getString("text"));
1133- assertEquals ("Job läuft im Testmodus." , resultMessage .getString ("text" ));
1131+ assertEquals (messageProvider .get ("jobTestRun" , null , Locale .GERMAN ), resultMessage .getString ("text" ));
11341132
11351133 persistenceService .run (Delete .from (JOB ).where (j -> j .ID ().eq (ID )));
11361134 }
@@ -1727,8 +1725,8 @@ void createJobWithWrongData() throws Exception {
17271725 )
17281726 .andExpect (status ().isBadRequest ());
17291727 // .andExpect(
1730- // jsonPath("$.message").value("Cannot parse value for sapafcsdk.scheduling.ProviderService.Job:startDateTime")
1731- // );
1728+ // jsonPath("$.message").value("Cannot parse value for sapafcsdk.scheduling.ProviderService.Job:startDateTime")
1729+ //);
17321730 job = new JSONObject (Map .of ("name" , "JOB_1" , "referenceID" , "c1253940-5f25-4a0b-8585-f62bd085b327" , "x" , "y" ));
17331731 mockMvc
17341732 .perform (
@@ -1738,7 +1736,6 @@ void createJobWithWrongData() throws Exception {
17381736 .locale (Locale .ENGLISH )
17391737 )
17401738 .andExpect (status ().isBadRequest ());
1741- // .andExpect(jsonPath("$.code").value("parserError"))
17421739 // .andExpect(jsonPath("$.message").value("No element with name 'x' in 'sapafcsdk.scheduling.ProviderService.Job'"));
17431740 job = new JSONObject (
17441741 Map .of (
0 commit comments