MCPcopy Index your code
hub / github.com/oshi/oshi / testFstat

Method testFstat

oshi-core/src/test/java/oshi/util/FstatUtilTest.java:43–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41class FstatUtilTest {
42
43 @Test
44 void testFstat() {
45 if (SystemInfo.getCurrentPlatform().equals(OPENBSD)) {
46 int pid = new SystemInfo().getOperatingSystem().getProcessId();
47
48 assertThat("Number of open files must be nonnegative", FstatUtil.getOpenFiles(pid),
49 is(greaterThanOrEqualTo(0L)));
50
51 assertThat("Cwd should not be empty", FstatUtil.getCwd(pid), is(not(emptyString())));
52 }
53 }
54}

Callers

nothing calls this directly

Calls 6

getCurrentPlatformMethod · 0.95
getOpenFilesMethod · 0.95
getCwdMethod · 0.95
getOperatingSystemMethod · 0.80
assertThatMethod · 0.80
getProcessIdMethod · 0.65

Tested by

no test coverage detected