#909: Update tests to JUnit 5

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
Bukkit/Spigot
2023-09-24 06:09:10 +10:00
parent eef02e5dd2
commit 2a6d2d27d7
50 changed files with 837 additions and 863 deletions

View File

@@ -1,9 +1,10 @@
package org.bukkit;
import static org.bukkit.support.MatcherAssert.*;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.junit.jupiter.api.Assertions.*;
import org.bukkit.material.MaterialData;
import org.junit.Test;
import org.junit.jupiter.api.Test;
public class MaterialTest {
@Test
@@ -30,9 +31,9 @@ public class MaterialTest {
}
}
@Test(expected = IllegalArgumentException.class)
@Test
public void matchMaterialByNull() {
Material.matchMaterial(null);
assertThrows(IllegalArgumentException.class, () -> Material.matchMaterial(null));
}
@Test