MCPcopy Create free account
hub / github.com/e2wugui/zeze / testFormat

Method testFormat

ZezeJava/ZezeJavaTest/src/UnitTest/Zeze/Util/TestStr.java:17–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 }
16
17 public void testFormat() {
18 var params = new HashMap<String, Object>();
19 var serverId = 0;
20 var host = "127.0.0.1";
21 var port = 80;
22 params.put("serverId", serverId);
23 params.put("host", host);
24 params.put("port", port);
25
26 var f = Str.format("begin_{serverId}_{host}_{port}_end", params);
27 Assert.assertEquals("begin_0_127.0.0.1_80_end", f);
28 System.out.println(f);
29 }
30
31 public void testParseVersion() {
32 Assert.assertEquals(0x0001_0000_0000_0000L, Str.parseVersion("1"));

Callers

nothing calls this directly

Calls 2

formatMethod · 0.95
putMethod · 0.65

Tested by

no test coverage detected