Merge branch 'develop' into feature/jakrtaee10
# Conflicts: # configuration/pom.xml # db/pom.xml # jeeutil/pom.xml # network/pom.xml # poi-util/pom.xml # pom.xml # util/pom.xml
This commit is contained in:
@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright 2019 Joern Muehlencord (joern@muehlencord.de).
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<project-shared-configuration>
|
||||
<!--
|
||||
This file contains additional configuration written by modules in the NetBeans IDE.
|
||||
The configuration is intended to be shared among all the users of project and
|
||||
therefore it is assumed to be part of version control checkout.
|
||||
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
|
||||
-->
|
||||
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
|
||||
<!--
|
||||
Properties that influence various parts of the IDE, especially code formatting and the like.
|
||||
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
|
||||
That way multiple projects can share the same settings (useful for formatting rules for example).
|
||||
Any value defined here will override the pom.xml file value but is only applicable to the current project.
|
||||
-->
|
||||
<netbeans.compile.on.save>all</netbeans.compile.on.save>
|
||||
</properties>
|
||||
</project-shared-configuration>
|
||||
@ -16,29 +16,35 @@ limitations under the License.
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<artifactId>shared-network</artifactId>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</build>
|
||||
<groupId>de.muehlencord.shared</groupId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>shared-network</name>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
<artifactId>shared</artifactId>
|
||||
<groupId>de.muehlencord</groupId>
|
||||
<version>2.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>slf4j-jdk14</artifactId>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>shared-util</artifactId>
|
||||
<groupId>de.muehlencord.shared</groupId>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -56,29 +62,17 @@ limitations under the License.
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Test -->
|
||||
<dependency>
|
||||
<artifactId>jaxws-api</artifactId>
|
||||
<groupId>javax.xml.ws</groupId>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>slf4j-jdk14</artifactId>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<scope>test</scope>
|
||||
<version>2.3.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<groupId>de.muehlencord.shared</groupId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>shared-network</name>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
<artifactId>shared</artifactId>
|
||||
<groupId>de.muehlencord</groupId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</project>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright 2019 Joern Muehlencord (joern@muehlencord.de).
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -22,77 +22,76 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.Test;k
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Joern Muehlencord (joern@muehlencord.de)
|
||||
*/
|
||||
public class HttpLayerTest extends BaseTest {
|
||||
class HttpLayerTest extends BaseTest {
|
||||
|
||||
@Test
|
||||
@Disabled
|
||||
public void testPostByMap() throws Exception {
|
||||
System.out.println("testPostByMap");
|
||||
Map<String, String[]> map = new HashMap<>();
|
||||
String[] value = {"Hello World!", "Hello World again"};
|
||||
map.put("message", value);
|
||||
@Test
|
||||
@Disabled
|
||||
void testPostByMap() throws Exception {
|
||||
System.out.println("testPostByMap");
|
||||
Map<String, String[]> map = new HashMap<>();
|
||||
String[] value = { "Hello World!", "Hello World again" };
|
||||
map.put("message", value);
|
||||
|
||||
HttpLayer httpLayer = new HttpLayer("http://localhost:8080/HttpPostListener/HttpPostListener");
|
||||
httpLayer.post(map);
|
||||
}
|
||||
HttpLayer httpLayer = new HttpLayer("http://localhost:8080/HttpPostListener/HttpPostListener");
|
||||
httpLayer.post(map);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled
|
||||
public void testPostByMapList() throws Exception {
|
||||
System.out.println("testPostByMapList");
|
||||
List<Map<String, String[]>> list = new LinkedList<>();
|
||||
Map<String, String[]> map = new HashMap<>();
|
||||
String[] value = {"Hello World!", "Hello World again"};
|
||||
map.put("message", value);
|
||||
list.add(map);
|
||||
map = new HashMap<>();
|
||||
String[] urlValue = {"http://localhost:8080/testurl"};
|
||||
map.put("url", urlValue);
|
||||
list.add(map);
|
||||
@Test
|
||||
@Disabled
|
||||
void testPostByMapList() throws Exception {
|
||||
System.out.println("testPostByMapList");
|
||||
List<Map<String, String[]>> list = new LinkedList<>();
|
||||
Map<String, String[]> map = new HashMap<>();
|
||||
String[] value = { "Hello World!", "Hello World again" };
|
||||
map.put("message", value);
|
||||
list.add(map);
|
||||
map = new HashMap<>();
|
||||
String[] urlValue = { "http://localhost:8080/testurl" };
|
||||
map.put("url", urlValue);
|
||||
list.add(map);
|
||||
|
||||
HttpLayer httpLayer = new HttpLayer("http://localhost:8080/HttpPostListener/HttpPostListener");
|
||||
httpLayer.post(list);
|
||||
}
|
||||
HttpLayer httpLayer = new HttpLayer("http://localhost:8080/HttpPostListener/HttpPostListener");
|
||||
httpLayer.post(list);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled
|
||||
public void testByValue() throws Exception {
|
||||
System.out.println("testByValue");
|
||||
HttpLayer httpLayer = new HttpLayer("http://localhost:8080/HttpPostListener/HttpPostListener");
|
||||
httpLayer.post("message", "Hello World by single parameter");
|
||||
}
|
||||
@Test
|
||||
@Disabled
|
||||
void testByValue() throws Exception {
|
||||
System.out.println("testByValue");
|
||||
HttpLayer httpLayer = new HttpLayer("http://localhost:8080/HttpPostListener/HttpPostListener");
|
||||
httpLayer.post("message", "Hello World by single parameter");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWithUnknownURL() throws MessageNotSendException {
|
||||
System.out.println("testWithUnknownURL");
|
||||
HttpLayer httpLayer = new HttpLayer("http://localhost/thisURLDoesNotExist");
|
||||
Assertions.assertThrows(MessageNotSendException.class, () -> {
|
||||
httpLayer.post("message", "Hello World by single parameter");
|
||||
});
|
||||
@Test
|
||||
void testWithUnknownURL() throws MessageNotSendException {
|
||||
System.out.println("testWithUnknownURL");
|
||||
HttpLayer httpLayer = new HttpLayer("http://localhost/thisURLDoesNotExist");
|
||||
Assertions.assertThrows(MessageNotSendException.class, () -> {
|
||||
httpLayer.post("message", "Hello World by single parameter");
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidURL() throws MessageNotSendException {
|
||||
System.out.println("testInvalidURL");
|
||||
HttpLayer httpLayer = new HttpLayer("joern@muehlencord.de");
|
||||
Assertions.assertThrows(MessageNotSendException.class, () -> {
|
||||
httpLayer.post("message", "Hello World by single parameter");
|
||||
});
|
||||
}
|
||||
@Test
|
||||
void testInvalidURL() throws MessageNotSendException {
|
||||
System.out.println("testInvalidURL");
|
||||
HttpLayer httpLayer = new HttpLayer("joern@muehlencord.de");
|
||||
Assertions.assertThrows(MessageNotSendException.class, () -> {
|
||||
httpLayer.post("message", "Hello World by single parameter");
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUnsupportedURL() throws MessageNotSendException {
|
||||
System.out.println("testUnsupportedURL");
|
||||
HttpLayer httpLayer = new HttpLayer("ftp://localhost");
|
||||
Assertions.assertThrows(MessageNotSendException.class, () -> {
|
||||
httpLayer.post("message", "Hello World by single parameter");
|
||||
});
|
||||
}
|
||||
@Test
|
||||
void testUnsupportedURL() throws MessageNotSendException {
|
||||
System.out.println("testUnsupportedURL");
|
||||
HttpLayer httpLayer = new HttpLayer("ftp://localhost");
|
||||
Assertions.assertThrows(MessageNotSendException.class, () -> {
|
||||
httpLayer.post("message", "Hello World by single parameter");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user