Added unit test support

This commit is contained in:
Remco Krews 2023-01-13 20:48:52 +00:00 committed by John
parent 2418dfd177
commit 37d1afecc0
4 changed files with 62 additions and 4 deletions

1
.gitignore vendored
View File

@ -6,7 +6,6 @@ target/**
TODO.txt
packet.pkt
plugins/**
src/test/
target/
config.ini
*.txt

View File

@ -15,4 +15,3 @@ build:
expire_in: 2 weeks
paths:
- target/Morningstar-*.jar

48
pom.xml
View File

@ -10,7 +10,9 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.jupiter.version>5.9.2</junit.jupiter.version>
<junit.platform.version>1.9.2</junit.platform.version>
<org.mockito.version>4.11.0</org.mockito.version>
<additionalparam>-Xdoclint:none</additionalparam>
</properties>
@ -179,7 +181,49 @@
<version>7.7.3</version>
</dependency>
<!-- <dependency>-->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-runner</artifactId>
<version>${junit.platform.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${org.mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${org.mockito.version}</version>
<scope>test</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.flywaydb</groupId>-->
<!-- <artifactId>flyway-mysql</artifactId>-->
<!-- <version>9.11.0</version>-->

View File

@ -0,0 +1,16 @@
package com.eu.habbo.core;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.junit.jupiter.MockitoExtension;
import static org.junit.jupiter.api.Assertions.assertEquals;
@ExtendWith(MockitoExtension.class)
public class ClassNameTest {
@Test
public void test() {
assertEquals("Hello, World!", "Hello, World!");
}
}