Added Junit 5 as dependency
This commit is contained in:
parent
c176dc6e75
commit
9b413f81ff
@ -8,9 +8,9 @@
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="test" value="true"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
@ -21,9 +21,9 @@
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
9
pom.xml
9
pom.xml
@ -16,6 +16,13 @@
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>5.5.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>envoy-common</finalName>
|
||||
<resources>
|
||||
@ -23,7 +30,7 @@
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<testSourceDirectory>src/test/java</testSourceDirectory>
|
||||
<testSourceDirectory>src/test/java</testSourceDirectory>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
@ -28,7 +28,7 @@ public abstract class Contact implements Serializable {
|
||||
*
|
||||
* @param id the ID of this contact
|
||||
* @param name the name of this contact
|
||||
* @param contacts the {@link Contacts} of this {@link Contact}
|
||||
* @param contacts the contacts of this {@link Contact}
|
||||
* @since Envoy Common v0.1-beta
|
||||
*/
|
||||
public Contact(long id, String name, Set<? extends Contact> contacts) {
|
||||
|
@ -2,7 +2,6 @@ package envoy.data;
|
||||
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
@ -126,7 +125,7 @@ public final class User extends Contact {
|
||||
if (serializeContacts) {
|
||||
getContacts().stream().filter(User.class::isInstance).map(User.class::cast).forEach(user -> user.serializeContacts = false);
|
||||
outputStream.writeObject(getContacts());
|
||||
} else outputStream.writeObject(new ArrayList<>());
|
||||
} else outputStream.writeObject(new HashSet<>());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user