aboutsummaryrefslogtreecommitdiff
path: root/src/test/kotlin/util/skyblock/SackUtilTest.kt
blob: e1b106e712a05eda8ff95a72271cd45316603456 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package moe.nea.firmament.test.util.skyblock

import io.kotest.core.spec.style.AnnotationSpec
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import moe.nea.firmament.test.testutil.ItemResources
import moe.nea.firmament.util.skyblock.SackUtil
import moe.nea.firmament.util.skyblock.SkyBlockItems

class SackUtilTest : AnnotationSpec() {
	@Test
	fun testOneRottenFlesh() {
		Assertions.assertEquals(
			listOf(
				SackUtil.SackUpdate(SkyBlockItems.ROTTEN_FLESH, "Rotten Flesh", 1)
			),
			SackUtil.getUpdatesFromMessage(ItemResources.loadText("sacks/gain-rotten-flesh"))
		)
	}

	@Test
	fun testAFewRegularItems() {
		Assertions.assertEquals(
			listOf(
				SackUtil.SackUpdate(SkyBlockItems.ROTTEN_FLESH, "Rotten Flesh", 1)
			),
			SackUtil.getUpdatesFromMessage(ItemResources.loadText("sacks/gain-and-lose-regular"))
		)
	}
}