feat(rewards): add 14 new shop items with twin backgrounds
Build, Test & Push Core Service / quality-check (push) Successful in 1m14s
Build, Test & Push Core Service / docker (push) Successful in 1m23s

Each page background gets a matching banner background. Tests verify
pairing, price constraints, and code length limits
This commit is contained in:
lobo committed 2026-10-03 17:31:19 +02:00
1 parent 8eab98df74
commit 74cc8297ce
3 files changed
+48 -1

No files matched your search

@@ -0,0 +1,33 @@
package core_service.modules.rewards.domain;
import core_service.shared.test.AbstractUnitTest;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import static org.assertj.core.api.Assertions.assertThat;
class ShopItemTest extends AbstractUnitTest {
@Test
void everyPageBackgroundHasABannerTwin() {
for (ShopItem item : ShopItem.values()) {
if (!item.name().startsWith("BG_")) continue;
ShopItem twin = ShopItem.valueOf("BN_" + item.name().substring(3));
assertThat(item.slot()).isEqualTo(LookSlot.PAGE_BACKGROUND);
assertThat(twin.slot()).isEqualTo(LookSlot.BANNER_BACKGROUND);
}
}
@Test
void buyableBannerBackgroundsCost300() {
assertThat(Arrays.stream(ShopItem.values())
.filter(item -> item.name().startsWith("BN_") && !item.unlockOnly())
.map(ShopItem::price)).containsOnly(300);
}
@Test
void codesFitTheColumn() {
assertThat(Arrays.stream(ShopItem.values()).map(Enum::name)).allMatch(name -> name.length() <= 32);
}
}