[Delete] Core, Framework-API 移除 BotCode 的 'getPlatform' 方法;

[Delete] BotCode 移除目前尚未使用的 'getPlatform' 方法, 该方法在开发 BotCode 具体实现时带来了一些麻烦;
[Delete] BasicBotCode, BasicBotCodeTest, AbstractBotCode, AbstractBotCodeTest, MessageChainTest 适配修改;
This commit is contained in:
2021-02-03 12:13:32 +08:00
parent 672be33866
commit 612956b594
6 changed files with 2 additions and 41 deletions

View File

@ -47,11 +47,6 @@ public class BasicBotCode extends AbstractBotCode {
super(function, functionProperties);
}
@Override
public Platform getPlatform() {
return PLATFORM;
}
@Override
public String contentToString() {
StringBuilder builder = new StringBuilder('[' + getFunction().getFunctionName());

View File

@ -17,7 +17,6 @@
package net.lamgc.cgj.bot.framework.base;
import net.lamgc.cgj.bot.framework.Platform;
import net.lamgc.cgj.bot.framework.message.AbstractBotCode;
import net.lamgc.cgj.bot.framework.message.BotCode;
import net.lamgc.cgj.bot.framework.message.BotCodeFunction;
@ -33,14 +32,6 @@ import java.util.Map;
*/
public class BasicBotCodeTest {
@Test
public void getPlatform() {
BotCode botCode = new BasicBotCode(StandardBotCodeFunction.AT);
Assert.assertEquals("ContentGrabbingJi", botCode.getPlatform().getPlatformName());
Assert.assertEquals("CGJ", botCode.getPlatform().getPlatformIdentify());
}
@Test
public void contentToStringWithoutParameter() {
BotCode botCode = new BasicBotCode(StandardBotCodeFunction.FILE);
@ -67,11 +58,6 @@ public class BasicBotCodeTest {
super(function, functionProperties);
}
@Override
public Platform getPlatform() {
return null;
}
@Override
public String contentToString() {
return null;