Skip to content
Snippets Groups Projects
Commit 825c5280 authored by OZG-Cloud Team's avatar OZG-Cloud Team
Browse files

OZG-6748 enterprise-adapter: Add test for oeid

parent 3c646d08
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import java.util.List;
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.mockito.ArgumentCaptor;
......@@ -76,7 +77,8 @@ class EnterpriseEntryITCase {
assertThat(formData).isNotNull();
}
void shouldHaveNoOfRepresentations() {
@Test
void shouldHaveTwoRepresentations() {
var formData = doPostRequest();
assertThat(formData.getNumberOfRepresentations()).isEqualTo(2);
......@@ -96,6 +98,15 @@ class EnterpriseEntryITCase {
assertThat(formData.getHeader().getServiceKonto().getType()).isEqualTo("MUK");
}
@DisplayName("should have organisationseinheit id")
@Test
void shouldHaveOrganisationseinheitId() {
var formData = doPostRequest();
assertThat(formData.getZustaendigeStelleList().getFirst().getOrganisationseinheitenId()).isEqualTo(
ControlDataTestFactory.ZUSTAENDIGE_STELLE);
}
@SneakyThrows
private FormData doPostRequest() {
mockMvc.perform(multipart("/antrag")
......
{
"control": {
"transactionId": "4e7a6ae7-4d0f-444d-8971-7cfc051c9924",
"zustaendigeStelleList": [ "248240886" ],
"zustaendigeStelle": "248240886",
"leikaIds": [
"99108011000000",
"99108011153000"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment