Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eclipse Projects
Eclipse openK User Modules
org.eclipse.openk-usermodules.gridFailureInformation.backend
Commits
a95b90ec
Commit
a95b90ec
authored
May 10, 2020
by
Simon Reis
Browse files
SI-152 Störungsauskunft Import: WIP
parent
31163309
Changes
2
Hide whitespace changes
Inline
Side-by-side
stoerungsauskunftInterface/src/main/java/org/eclipse/openk/gridfailureinformation/jobs/stoerauskunftinterface/controller/ImportExportController.java
View file @
a95b90ec
...
...
@@ -40,7 +40,7 @@ public class ImportExportController {
@Autowired
private
ImportExportService
importExportService
;
@GetMapping
(
"/user
-
notification"
)
@GetMapping
(
"/usernotification
-import-test
"
)
@ApiOperation
(
value
=
"Import einer externen Störungsinformation"
)
@ApiResponses
(
value
=
{
@ApiResponse
(
code
=
201
,
message
=
"Störungsinformation erfolgreich importiert"
),
...
...
@@ -51,7 +51,7 @@ public class ImportExportController {
importExportService
.
importUserNotifications
();
}
@PostMapping
(
"/outage-test"
)
@PostMapping
(
"/outage-
export-
test"
)
@ApiOperation
(
value
=
"Export einer Störungsinformation"
)
@ApiResponses
(
value
=
{
@ApiResponse
(
code
=
201
,
message
=
"Störungsinformation erfolgreich exportiert"
),
...
...
stoerungsauskunftInterface/src/test/java/org/eclipse/openk/gridfailureinformation/jobs/stoerauskunftinterface/controller/ImportExportControllerTest.java
View file @
a95b90ec
...
...
@@ -53,7 +53,7 @@ public class ImportExportControllerTest {
@Test
public
void
shouldCallImport
()
throws
Exception
{
mockMvc
.
perform
(
get
(
"/stoerungsauskunft/user
-
notification"
))
mockMvc
.
perform
(
get
(
"/stoerungsauskunft/usernotification
-import-test
"
))
.
andExpect
(
status
().
is2xxSuccessful
());
verify
(
importExportService
,
times
(
1
)).
importUserNotifications
();
...
...
@@ -64,7 +64,7 @@ public class ImportExportControllerTest {
ForeignFailureMessageDto
foreignFailureMessageDto
=
MockDataHelper
.
mockForeignFailureDto
();
mockMvc
.
perform
(
post
(
"/stoerungsauskunft/outage-test"
)
mockMvc
.
perform
(
post
(
"/stoerungsauskunft/outage-
export-
test"
)
.
contentType
(
MediaType
.
APPLICATION_JSON
)
.
content
(
new
ObjectMapper
().
writeValueAsString
(
foreignFailureMessageDto
)))
.
andExpect
(
status
().
is2xxSuccessful
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment