diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/at/hannibal2/skyhanni/test/ItemUtilsTest.kt | 26 | ||||
-rw-r--r-- | src/test/java/at/hannibal2/skyhanni/test/garden/VisitorToolTipParserTest.kt | 22 |
2 files changed, 27 insertions, 21 deletions
diff --git a/src/test/java/at/hannibal2/skyhanni/test/ItemUtilsTest.kt b/src/test/java/at/hannibal2/skyhanni/test/ItemUtilsTest.kt index 0ac8cc8de..276e53159 100644 --- a/src/test/java/at/hannibal2/skyhanni/test/ItemUtilsTest.kt +++ b/src/test/java/at/hannibal2/skyhanni/test/ItemUtilsTest.kt @@ -5,18 +5,18 @@ import org.junit.jupiter.api.Test class ItemUtilsTest { - val items: MutableMap<String, Pair<String, Int>> = mutableMapOf( - "§5Hoe of Greatest Tilling" to Pair("§5Hoe of Greatest Tilling", 1), - "§fSilver medal §8x2" to Pair("§fSilver medal", 2), - "§aJacob's Ticket §8x32" to Pair("§aJacob's Ticket", 32), - "§9Delicate V" to Pair("§9Delicate V", 1), - " §81x §9Enchanted Sugar Cane" to Pair("§9Enchanted Sugar Cane", 1), - "§6Gold medal" to Pair("§6Gold medal", 1), - " §8+§319k §7Farming XP" to Pair("§7Farming XP", 19_000), - " §8+§215 §7Garden Experience" to Pair("§7Garden Experience", 15), - " §8+§c21 Copper" to Pair("Copper", 21), - " §8+§b10 Bits" to Pair("Bits", 10), - " §8+§37.2k §7Farming XP" to Pair("§7Farming XP", 7_200), + private val items: MutableMap<String, Pair<String, Int>> = mutableMapOf( + "§5Hoe of Greatest Tilling" to Pair("§5Hoe of Greatest Tilling", 1), + "§fSilver medal §8x2" to Pair("§fSilver medal", 2), + "§aJacob's Ticket §8x32" to Pair("§aJacob's Ticket", 32), + "§9Delicate V" to Pair("§9Delicate V", 1), + " §81x §9Enchanted Sugar Cane" to Pair("§9Enchanted Sugar Cane", 1), + "§6Gold medal" to Pair("§6Gold medal", 1), + " §8+§319k §7Farming XP" to Pair("§7Farming XP", 19_000), + " §8+§215 §7Garden Experience" to Pair("§7Garden Experience", 15), + " §8+§c21 Copper" to Pair("Copper", 21), + " §8+§b10 Bits" to Pair("Bits", 10), + " §8+§37.2k §7Farming XP" to Pair("§7Farming XP", 7_200), ) @Test @@ -31,4 +31,4 @@ class ItemUtilsTest { } } } -}
\ No newline at end of file +} diff --git a/src/test/java/at/hannibal2/skyhanni/test/garden/VisitorToolTipParserTest.kt b/src/test/java/at/hannibal2/skyhanni/test/garden/VisitorToolTipParserTest.kt index 0f2ad1fee..cdb171aa6 100644 --- a/src/test/java/at/hannibal2/skyhanni/test/garden/VisitorToolTipParserTest.kt +++ b/src/test/java/at/hannibal2/skyhanni/test/garden/VisitorToolTipParserTest.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.test.garden -import at.hannibal2.skyhanni.config.features.GardenConfig +import at.hannibal2.skyhanni.config.features.garden.GardenConfig import at.hannibal2.skyhanni.features.garden.visitor.VisitorTooltipParser import org.junit.jupiter.api.Test @@ -22,18 +22,22 @@ class VisitorToolTipParserTest { @Test fun testParseItemsNeeded() { - val parsedData = VisitorTooltipParser.parse(lore, GardenConfig()) + val parsedData = VisitorTooltipParser.parse(lore, + GardenConfig() + ) assert(parsedData.itemsNeeded.isNotEmpty()) { "Visitor items needed is ${parsedData.itemsNeeded.count()} instead of 1" } - assert(parsedData.itemsNeeded.get("§aEnchanted Hay Bale") == 28) { + assert(parsedData.itemsNeeded["§aEnchanted Hay Bale"] == 28) { "Visitor items needed does not contain '§aEnchanted Hay Bale'" } } @Test fun testParseRewards() { - val parsedData = VisitorTooltipParser.parse(lore, GardenConfig()) + val parsedData = VisitorTooltipParser.parse(lore, + GardenConfig() + ) assert(parsedData.rewards.isNotEmpty()) { "Visitor rewards is ${parsedData.rewards.count()} instead of 6" } @@ -48,7 +52,7 @@ class VisitorToolTipParserTest { ) for ((itemName, amount) in assertions) { - assert(parsedData.rewards.get(itemName) == amount) { + assert(parsedData.rewards[itemName] == amount) { "Visitor rewards does not contain '$itemName' with amount '$amount'" } } @@ -56,10 +60,12 @@ class VisitorToolTipParserTest { @Test fun testParseCopper() { - val parsedData = VisitorTooltipParser.parse(lore, GardenConfig()) - val copper = parsedData.rewards.get("Copper") + val parsedData = VisitorTooltipParser.parse(lore, + GardenConfig() + ) + val copper = parsedData.rewards["Copper"] assert(copper == 23) { "Visitor rewards does not contain 'Copper' with amount '23'" } } -}
\ No newline at end of file +} |