MCPcopy Create free account
hub / github.com/oshi/oshi / testReadProcIo

Method testReadProcIo

oshi-core/src/test/java/oshi/util/FileUtilTest.java:120–135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118 }
119
120 @Test
121 void testReadProcIo() {
122 Map<String, String> expected = new HashMap<>();
123 expected.put("rchar", "124788352");
124 expected.put("wchar", "124802481");
125 expected.put("syscr", "135");
126 expected.put("syscw", "1547");
127 expected.put("read_bytes", "40304640");
128 expected.put("write_bytes", "124780544");
129 expected.put("cancelled_write_bytes", "42");
130 Map<String, String> actual = FileUtil.getKeyValueMapFromFile(PROCIO_FILE, ":");
131 assertThat("procio size", actual, is(aMapWithSize(expected.size())));
132 for (Entry<String, String> entry : expected.entrySet()) {
133 assertThat("procio entry", actual, hasEntry(entry.getKey(), entry.getValue()));
134 }
135 }
136
137 @Test
138 void testReadProperties() {

Callers

nothing calls this directly

Calls 4

assertThatMethod · 0.80
getKeyMethod · 0.80
getValueMethod · 0.45

Tested by

no test coverage detected