Skip to content
Snippets Groups Projects
Select Git revision
  • 8a9ca4975e6f94852a063ad28e36b7c8982e860f
  • main default protected
  • release
  • OZG-7856_schadcode_scanner
  • ci-pipeline
  • OZG-7526-signatur-nicht-uebernommen
  • OZG-6223-zip-download-bug
  • OZG-7367-tooltip-extension
  • OZG-7023-OZG-6956-E2E-externe-Stellen
  • OZG-6238-npm-durch-pnpm-ersetzen
  • release-admin
  • release-info
  • OZG-6700-admin-feature-toggle
  • E2E-Updates
  • OZG-7047-tooltips
  • OZG-6957-e2e-fachstellen-oe-daten
  • OZG-7006-ZuarbeitAnfragen
  • temp_OZG-7027
  • unit-tests-hotfix
  • OZG-6731-POC-keycloakResourceService-with-multiple-stateResources
  • e2e-add-zufi-version
  • 2.26.0
  • 2.25.0
  • 2.24.2
  • 2.24.1
  • 2.24.0
  • 2.23.0
  • 2.22.0
  • 2.21.0
  • 2.20.0
  • 2.21.0-SNAPSHOT
  • 2.19.0
  • 2.18.0
  • 2.17.1
  • 1.3.0
  • release-admin-1.3.0
  • release-info-1.3.0
  • 2.17.0
  • 2.16.0
  • 2.15.0
  • release-admin-1.1.0
41 results

tailwind.config.js

Blame
  • XtaClientITCase.java 1.92 KiB
    package de.ozgcloud.xta.client;
    
    import static org.assertj.core.api.Assertions.*;
    
    import java.io.File;
    import java.io.IOException;
    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 com.google.common.io.Files;
    
    import de.ozgcloud.xta.client.config.XtaClientConfig;
    import lombok.SneakyThrows;
    
    class XtaClientITCase {
    
    	private XtaClient client;
    
    	private static final String CLIENT_IDENTIFIER = "afmsh:010600000000_Online-Dienste";
    
    	private static final String BASE_URL = "https://li33-0005.dp.dsecurecloud.de/MB_XTA-WS/XTA210";
    
    	private static final XtaClientFactory clientFactory;
    
    	private static final XtaClientConfig CONFIG;
    
    	static {
    		var clientCertKeyStore = XtaClientConfig.KeyStore.builder()
    				.content(readBytesFromFile("/path/to/KOP_SH_KIEL_DEV.p12"))
    				.type("PKCS12")
    				.password("***".toCharArray())
    				.build();
    		CONFIG = XtaClientConfig.builder()
    				.clientIdentifiers(List.of(CLIENT_IDENTIFIER))
    				.managementServiceUrl(BASE_URL + "managementPort.svc")
    				.sendServiceUrl(BASE_URL + "sendPort.svc")
    				.msgBoxServiceUrl(BASE_URL + "msgBoxPort.svc")
    				.clientCertKeystore(clientCertKeyStore)
    				.logSoapRequests(true)
    				.logSoapResponses(true)
    				.build();
    		clientFactory = XtaClientFactory.from(CONFIG);
    	}
    
    	@BeforeEach
    	@SneakyThrows
    	void mock() {
    		client = clientFactory.create();
    	}
    
    	@DisplayName("get status list")
    	@Nested
    	class TestGetStatusList {
    
    		@DisplayName("should return with no pending messages")
    		@Test
    		@SneakyThrows
    		void shouldReturnWithNoPendingMessages() {
    			var result = client.getMessagesMetadata(CLIENT_IDENTIFIER);
    
    			assertThat(result.pendingMessageCount()).isZero();
    		}
    	}
    
    	private static byte[] readBytesFromFile(String path) {
    		try {
    			return Files.toByteArray(new File(path));
    		} catch (IOException e) {
    			throw new RuntimeException(e);
    		}
    	}
    }