Update to Junit5 and allow for mcMMO to be compiled on Java 16 (#4552)

* Updated all unit tests to Junit5 and removed Powermock

* Some formatting

* I did not mean to commit this file

* Fixed file ending

* We don't need these extra dependencies

* Replaced delegate with Junit5 assertThrows

* Revert this change

* Re-add mockito-core

* A bit more refactoring

* Update surefire and remove failsafe

* Updated Mockito

* Add failsafe back

* Bump Mockito to 3.11.2

They literally just released that.
This commit is contained in:
TheBusyBiscuit
2021-06-21 18:21:55 +02:00
committed by GitHub
parent fffbacd239
commit e35bfe758c
7 changed files with 234 additions and 217 deletions

View File

@@ -14,10 +14,10 @@ import org.junit.jupiter.api.Test;
* See https://github.com/mcMMO-Dev/mcMMO/pull/4446
*
*/
public class TextUtilsTest {
class TextUtilsTest {
@Test
public void testColorizeText() {
void testColorizeText() {
String inputText = "&4This text should be red.";
/*
@@ -26,6 +26,7 @@ public class TextUtilsTest {
*/
TextComponent component = TextUtils.colorizeText(inputText);
Assertions.assertEquals(NamedTextColor.DARK_RED, component.color(), "Looks like Adventure is not working correctly.");
String message = "Looks like Adventure is not working correctly. We likely need to update our dependency!";
Assertions.assertEquals(NamedTextColor.DARK_RED, component.color(), message);
}
}