From f05700cb19b04b947d457f58308a4e1b5d597b8d Mon Sep 17 00:00:00 2001 From: Eiriksgata <2353686862@qq.com> Date: Wed, 11 Oct 2023 10:56:56 +0800 Subject: [PATCH] update dice test class --- rulateday-server/src/test/java/DiceTest.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/rulateday-server/src/test/java/DiceTest.java b/rulateday-server/src/test/java/DiceTest.java index 5587f6a..19c1287 100644 --- a/rulateday-server/src/test/java/DiceTest.java +++ b/rulateday-server/src/test/java/DiceTest.java @@ -3,6 +3,7 @@ import com.github.eiriksgata.trpg.dice.message.handle.InstructHandle; import com.github.eiriksgata.trpg.dice.operation.impl.RollRoleImpl; import com.github.eiriksgata.trpg.dice.operation.impl.SanCheckImpl; +import com.github.eiriksgata.trpg.dice.reply.CustomText; import com.github.eiriksgata.trpg.dice.vo.MessageData; import com.github.eiriksgata.rulateday.instruction.RollController; import com.github.eiriksgata.rulateday.init.LoadDatabaseFile; @@ -14,12 +15,6 @@ import java.text.MessageFormat; import java.util.ResourceBundle; -/** - * author: create by Keith - * version: v1.0 - * description: PACKAGE_NAME - * date:2020/10/12 - **/ public class DiceTest { @@ -55,12 +50,14 @@ void instructTest() { @Test - void rollTest() { + void rollTest() throws Exception { + LoadDatabaseFile.initConfigCustomTextTool(); + LoadDatabaseFile.createAndLoadConfigFile(); MessageData messageData = new MessageData<>(); messageData.setQqID(123456789L); InstructHandle instruct = new InstructHandle(); - messageData.setMessage("r4d6"); + messageData.setMessage("betaon"); try { System.out.println(instruct.instructCheck(messageData)); } catch (DiceInstructException e) {