From 024cd40a3a3e98da87a1ce6eaaebd379f312cc72 Mon Sep 17 00:00:00 2001 From: Walker Selby Date: Thu, 16 Nov 2023 10:40:55 +0000 Subject: Config Updates - Subcategories and Reformatting (#709) Added new sub category stuff from moul config #709 --- .../skyhanni/test/garden/VisitorToolTipParserTest.kt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/test/java') 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..11b404e4c 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,7 +22,9 @@ 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" } @@ -33,7 +35,9 @@ class VisitorToolTipParserTest { @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" } @@ -56,10 +60,12 @@ class VisitorToolTipParserTest { @Test fun testParseCopper() { - val parsedData = VisitorTooltipParser.parse(lore, GardenConfig()) + val parsedData = VisitorTooltipParser.parse(lore, + GardenConfig() + ) val copper = parsedData.rewards.get("Copper") assert(copper == 23) { "Visitor rewards does not contain 'Copper' with amount '23'" } } -} \ No newline at end of file +} -- cgit From 4ff0a7de8109b748cdaa707e9714478140095171 Mon Sep 17 00:00:00 2001 From: Walker Selby Date: Wed, 22 Nov 2023 11:50:00 +0000 Subject: Internal Change: Reformat Code to match .editorconfig (#628) Code cleanup done everywhere #628 --- .../at/hannibal2/skyhanni/test/ItemUtilsTest.kt | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/test/java') diff --git a/src/test/java/at/hannibal2/skyhanni/test/ItemUtilsTest.kt b/src/test/java/at/hannibal2/skyhanni/test/ItemUtilsTest.kt index 0ac8cc8de..cd34234b5 100644 --- a/src/test/java/at/hannibal2/skyhanni/test/ItemUtilsTest.kt +++ b/src/test/java/at/hannibal2/skyhanni/test/ItemUtilsTest.kt @@ -6,17 +6,17 @@ import org.junit.jupiter.api.Test class ItemUtilsTest { val items: MutableMap> = 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), + "§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 +} -- cgit From 5c9cbdba458638ae962ccf92e750ebdcea718478 Mon Sep 17 00:00:00 2001 From: Walker Selby Date: Wed, 22 Nov 2023 12:10:51 +0000 Subject: Internal Change: More Random Cleanup (#724) More Random Cleanup #724 --- src/test/java/at/hannibal2/skyhanni/test/ItemUtilsTest.kt | 2 +- .../at/hannibal2/skyhanni/test/garden/VisitorToolTipParserTest.kt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test/java') diff --git a/src/test/java/at/hannibal2/skyhanni/test/ItemUtilsTest.kt b/src/test/java/at/hannibal2/skyhanni/test/ItemUtilsTest.kt index cd34234b5..276e53159 100644 --- a/src/test/java/at/hannibal2/skyhanni/test/ItemUtilsTest.kt +++ b/src/test/java/at/hannibal2/skyhanni/test/ItemUtilsTest.kt @@ -5,7 +5,7 @@ import org.junit.jupiter.api.Test class ItemUtilsTest { - val items: MutableMap> = mutableMapOf( + private val items: MutableMap> = 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), 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 11b404e4c..cdb171aa6 100644 --- a/src/test/java/at/hannibal2/skyhanni/test/garden/VisitorToolTipParserTest.kt +++ b/src/test/java/at/hannibal2/skyhanni/test/garden/VisitorToolTipParserTest.kt @@ -28,7 +28,7 @@ class VisitorToolTipParserTest { 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'" } } @@ -52,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'" } } @@ -63,7 +63,7 @@ class VisitorToolTipParserTest { val parsedData = VisitorTooltipParser.parse(lore, GardenConfig() ) - val copper = parsedData.rewards.get("Copper") + val copper = parsedData.rewards["Copper"] assert(copper == 23) { "Visitor rewards does not contain 'Copper' with amount '23'" } -- cgit