aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorWalker Selby <git@walkerselby.com>2023-11-22 12:20:15 +0000
committerWalker Selby <git@walkerselby.com>2023-11-22 12:20:15 +0000
commit514d3f0ec1eb3a7900206ac0b0469d922828b506 (patch)
tree0a0dba7248bcb6acfa0f5fbb7526cc4ee0ea9bba /src/test
parentbf225d26b399fcc3fd258d7acbdedb1e76154b8e (diff)
parenta6de55740355b3bc4d7c869626d22da5b3854416 (diff)
downloadskyhanni-514d3f0ec1eb3a7900206ac0b0469d922828b506.tar.gz
skyhanni-514d3f0ec1eb3a7900206ac0b0469d922828b506.tar.bz2
skyhanni-514d3f0ec1eb3a7900206ac0b0469d922828b506.zip
Merge branch 'beta' into https
# Conflicts: # src/main/java/SkyHanniInstallerFrame.java
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/at/hannibal2/skyhanni/test/ItemUtilsTest.kt26
-rw-r--r--src/test/java/at/hannibal2/skyhanni/test/garden/VisitorToolTipParserTest.kt22
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
+}