From 05e6d2eca5f8d3f1f3a6201eeed9f64847572670 Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Fri, 22 Dec 2023 23:29:43 +0800 Subject: Add fabric loader junit and ItemUtilsTest --- .../de/hysky/skyblocker/skyblock/ChestValueTest.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'src/test/java/de/hysky/skyblocker/skyblock/ChestValueTest.java') diff --git a/src/test/java/de/hysky/skyblocker/skyblock/ChestValueTest.java b/src/test/java/de/hysky/skyblocker/skyblock/ChestValueTest.java index 261ab517..a8c4975c 100644 --- a/src/test/java/de/hysky/skyblocker/skyblock/ChestValueTest.java +++ b/src/test/java/de/hysky/skyblocker/skyblock/ChestValueTest.java @@ -1,21 +1,18 @@ package de.hysky.skyblocker.skyblock; -import de.hysky.skyblocker.config.SkyblockerConfig; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; public class ChestValueTest { @Test void testProfitText() { - SkyblockerConfig.DungeonChestProfit dCPConfig = new SkyblockerConfig.DungeonChestProfit(); - Assertions.assertEquals("literal{ 0 Coins}[style={color=dark_gray}]", ChestValue.getProfitText(0, false, dCPConfig.neutralThreshold, dCPConfig.neutralColor, dCPConfig.profitColor, dCPConfig.lossColor, dCPConfig.incompleteColor).toString()); - Assertions.assertEquals("literal{ 0 Coins}[style={color=blue}]", ChestValue.getProfitText(0, true, dCPConfig.neutralThreshold, dCPConfig.neutralColor, dCPConfig.profitColor, dCPConfig.lossColor, dCPConfig.incompleteColor).toString()); - Assertions.assertEquals("literal{ +10,000 Coins}[style={color=dark_green}]", ChestValue.getProfitText(10000, false, dCPConfig.neutralThreshold, dCPConfig.neutralColor, dCPConfig.profitColor, dCPConfig.lossColor, dCPConfig.incompleteColor).toString()); - Assertions.assertEquals("literal{ +10,000 Coins}[style={color=blue}]", ChestValue.getProfitText(10000, true, dCPConfig.neutralThreshold, dCPConfig.neutralColor, dCPConfig.profitColor, dCPConfig.lossColor, dCPConfig.incompleteColor).toString()); - Assertions.assertEquals("literal{ -10,000 Coins}[style={color=red}]", ChestValue.getProfitText(-10000, false, dCPConfig.neutralThreshold, dCPConfig.neutralColor, dCPConfig.profitColor, dCPConfig.lossColor, dCPConfig.incompleteColor).toString()); - Assertions.assertEquals("literal{ -10,000 Coins}[style={color=blue}]", ChestValue.getProfitText(-10000, true, dCPConfig.neutralThreshold, dCPConfig.neutralColor, dCPConfig.profitColor, dCPConfig.lossColor, dCPConfig.incompleteColor).toString()); - SkyblockerConfig.ChestValue cVConfig = new SkyblockerConfig.ChestValue(); - Assertions.assertEquals("literal{ 10,000 Coins}[style={color=dark_green}]", ChestValue.getValueText(10000, false, cVConfig.color, cVConfig.incompleteColor).toString()); - Assertions.assertEquals("literal{ 10,000 Coins}[style={color=blue}]", ChestValue.getValueText(10000, true, cVConfig.color, cVConfig.incompleteColor).toString()); + Assertions.assertEquals("literal{ 0 Coins}[style={color=dark_gray}]", ChestValue.getProfitText(0, false).toString()); + Assertions.assertEquals("literal{ 0 Coins}[style={color=blue}]", ChestValue.getProfitText(0, true).toString()); + Assertions.assertEquals("literal{ +10,000 Coins}[style={color=dark_green}]", ChestValue.getProfitText(10000, false).toString()); + Assertions.assertEquals("literal{ +10,000 Coins}[style={color=blue}]", ChestValue.getProfitText(10000, true).toString()); + Assertions.assertEquals("literal{ -10,000 Coins}[style={color=red}]", ChestValue.getProfitText(-10000, false).toString()); + Assertions.assertEquals("literal{ -10,000 Coins}[style={color=blue}]", ChestValue.getProfitText(-10000, true).toString()); + Assertions.assertEquals("literal{ 10,000 Coins}[style={color=dark_green}]", ChestValue.getValueText(10000, false).toString()); + Assertions.assertEquals("literal{ 10,000 Coins}[style={color=blue}]", ChestValue.getValueText(10000, true).toString()); } } -- cgit