Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alfa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
app
alfa
Commits
1b09d06d
Commit
1b09d06d
authored
6 days ago
by
Krzysztof Witukiewicz
Browse files
Options
Downloads
Patches
Plain Diff
OZG-7773 OZG-8001 Fix test
parent
0a291f21
No related branches found
Branches containing commit
No related tags found
1 merge request
!27
Ozg 7773 nachrichten auf ungelesen setzen
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
alfa-service/src/test/java/de/ozgcloud/alfa/vorgang/VorgangControllerITCase.java
+6
-12
6 additions, 12 deletions
...ava/de/ozgcloud/alfa/vorgang/VorgangControllerITCase.java
with
6 additions
and
12 deletions
alfa-service/src/test/java/de/ozgcloud/alfa/vorgang/VorgangControllerITCase.java
+
6
−
12
View file @
1b09d06d
...
...
@@ -39,6 +39,8 @@ import org.junit.jupiter.api.BeforeEach;
import
org.junit.jupiter.api.DisplayName
;
import
org.junit.jupiter.api.Nested
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.params.ParameterizedTest
;
import
org.junit.jupiter.params.provider.ValueSource
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc
;
import
org.springframework.boot.test.context.SpringBootTest
;
...
...
@@ -281,24 +283,16 @@ class VorgangControllerITCase {
@Nested
class
TestClientAttribute
{
@Test
void
shouldReturnNoContent
()
throws
Exception
{
var
content
=
VorgangHeaderTestFactory
.
createHasNewPostfachNachrichtContent
(
false
);
@ParameterizedTest
@ValueSource
(
booleans
=
{
true
,
false
})
void
shouldReturnNoContent
(
boolean
hasNewPostfachNachricht
)
throws
Exception
{
var
content
=
VorgangHeaderTestFactory
.
createHasNewPostfachNachrichtContent
(
hasNewPostfachNachricht
);
var
response
=
doRequest
(
content
);
response
.
andExpect
(
status
().
isNoContent
());
}
@Test
void
shouldReturnUnprocessableEntity
()
throws
Exception
{
var
content
=
VorgangHeaderTestFactory
.
createHasNewPostfachNachrichtContent
(
true
);
var
response
=
doRequest
(
content
);
response
.
andExpect
(
status
().
isUnprocessableEntity
());
}
private
ResultActions
doRequest
(
String
content
)
throws
Exception
{
return
mockMvc
.
perform
(
put
(
"/api/vorgangs/{0}/hasNewPostfachNachricht"
,
VorgangHeaderTestFactory
.
ID
).
with
(
csrf
())
.
contentType
(
MediaType
.
APPLICATION_JSON
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment