feat: net
parent
aaa03a4ea0
commit
7e8226b2b2
|
|
@ -27,6 +27,8 @@ public final class Constants {
|
|||
public static final String NONCE = "X-SCFS-Nonce";
|
||||
public static final String SECRET_KEY = "X-SCFS-Secret-Key";
|
||||
public static final String REQUEST_ID = "X-SCFS-Request-Id";
|
||||
public static final String IP_ADDRESS = "X-SCFS-IP-Address";
|
||||
public static final String MAC_ADDRESS = "X-SCFS-Mac-Address";
|
||||
/// http 实体头部
|
||||
public static final String AUTHORIZATION = "Authorization";
|
||||
public static final String USER_AGENT = "User-Agent";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
package com.czcb.scfs.api.core.util;
|
||||
|
||||
public final class Net {
|
||||
private Net() {
|
||||
}
|
||||
|
||||
public static String macAddress() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String ipAddress() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -16,6 +16,8 @@ class ConstantsTest {
|
|||
Assertions.assertEquals("X-SCFS-Nonce", Constants.NONCE);
|
||||
Assertions.assertEquals("X-SCFS-Timestamp", Constants.TIMESTAMP);
|
||||
Assertions.assertEquals("X-SCFS-Request-Id", Constants.REQUEST_ID);
|
||||
Assertions.assertEquals("X-SCFS-IP-Address", Constants.IP_ADDRESS);
|
||||
Assertions.assertEquals("X-SCFS-Mac-Address", Constants.MAC_ADDRESS);
|
||||
|
||||
Assertions.assertEquals("Content-Type", Constants.CONTENT_TYPE);
|
||||
Assertions.assertEquals("Authorization", Constants.AUTHORIZATION);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
package com.czcb.scfs.api.core.util;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class NetTest {
|
||||
|
||||
}
|
||||
|
|
@ -77,6 +77,7 @@ class StringsTest {
|
|||
@Test
|
||||
void isNotEmpty() {
|
||||
Assertions.assertTrue(Strings.isNotEmpty("11"));
|
||||
Assertions.assertFalse(Strings.isNotEmpty(null));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Reference in New Issue