forked from trpc-group/trpc-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommandAdminTest.java
More file actions
35 lines (30 loc) · 1.17 KB
/
Copy pathCommandAdminTest.java
File metadata and controls
35 lines (30 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* Tencent is pleased to support the open source community by making tRPC available.
*
* Copyright (C) 2023 Tencent.
* All rights reserved.
*
* If you have downloaded a copy of the tRPC source code from Tencent,
* please note that tRPC source code is licensed under the Apache 2.0 License,
* A copy of the Apache 2.0 License can be found in the LICENSE file.
*/
package com.tencent.trpc.admin;
import com.tencent.trpc.admin.dto.CommandDto;
import com.tencent.trpc.admin.dto.CommonDto;
import com.tencent.trpc.admin.impl.CommandAdmin;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.junit.Assert;
import org.junit.Test;
public class CommandAdminTest {
@Test
public void test() {
CommandAdmin commandAdmin = new CommandAdmin();
CommandDto commandDto = commandAdmin.getCommands();
commandDto.toString();
commandDto.setCmds(commandDto.getCmds());
Assert.assertTrue(CommonDto.SUCCESS.equals(commandDto.getErrorcode()));
Assert.assertTrue(StringUtils.isEmpty(commandDto.getMessage()));
Assert.assertTrue(CollectionUtils.isNotEmpty(commandDto.getCmds()));
}
}