fix: supportedShellTools not right

This commit is contained in:
ReaJason
2025-09-12 22:51:50 +08:00
parent d7eaf5c068
commit da16649e6f
3 changed files with 35 additions and 1 deletions
@@ -0,0 +1,27 @@
package com.reajason.javaweb.memshell;
import com.reajason.javaweb.Server;
import com.reajason.javaweb.memshell.server.AbstractServer;
import org.junit.jupiter.api.Test;
import java.util.Set;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* @author ReaJason
* @since 2025/8/25
*/
class ServerFactoryTest {
@Test
void testSupportedTools() {
AbstractServer server = ServerFactory.getServer(Server.XXLJOB);
Set<String> supportedShellTools = server.getSupportedShellTools();
assertEquals(2, supportedShellTools.size());
assertTrue(supportedShellTools.contains(ShellTool.Command));
assertTrue(supportedShellTools.contains(ShellTool.Godzilla));
}
}