增加mjutil 测试

This commit is contained in:
cherishsince 2024-04-06 21:59:57 +08:00
parent b1158fb1a7
commit 0c42d6175e
2 changed files with 24 additions and 8 deletions

View File

@ -7,6 +7,8 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* mj util
*
* author: fansili
* time: 2024/4/6 19:00
*/
@ -57,12 +59,4 @@ public class MjUtil {
return mjContent;
}
public static void main(String[] args) {
String content1 = "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (32%) (fast, stealth)";
String content2 = "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (fast, stealth)";
System.err.println(parseContent(content1));;
System.err.println(parseContent(content2));;
}
}

View File

@ -0,0 +1,22 @@
package cn.iocoder.yudao.framework.ai.mj;
import cn.iocoder.yudao.framework.ai.midjourney.util.MjUtil;
import org.junit.Test;
/**
* mj util
*
* author: fansili
* time: 2024/4/6 21:57
*/
public class MjUtilTests {
@Test
public void parseContentTest() {
String content1 = "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (32%) (fast, stealth)";
String content2 = "**南极应该是什么样子? --v 6.0 --style raw** - <@972721304891453450> (fast, stealth)";
System.err.println(MjUtil.parseContent(content1));
System.err.println(MjUtil.parseContent(content2));
}
}