2121import java .util .logging .Logger ;
2222import org .junit .jupiter .api .Nested ;
2323import org .junit .jupiter .api .Test ;
24+ import org .junit .jupiter .api .condition .DisabledIfEnvironmentVariable ;
2425import org .junitpioneer .jupiter .SetSystemProperty ;
2526
2627public class OSInfoTest {
@@ -62,7 +63,7 @@ public void folderPath() {
6263 }
6364
6465 @ Test
65- public void testMainForOSName () throws Exception {
66+ public void testMainForOSName () {
6667
6768 // preserve the current System.out
6869 PrintStream out = System .out ;
@@ -80,7 +81,7 @@ public void testMainForOSName() throws Exception {
8081 }
8182
8283 @ Test
83- public void testMainForArchName () throws Exception {
84+ public void testMainForArchName () {
8485
8586 // preserver the current System.out
8687 PrintStream out = System .out ;
@@ -98,9 +99,10 @@ public void testMainForArchName() throws Exception {
9899 }
99100
100101 @ Test
101- public void testGetHardwareName () throws Exception {
102- String hardware = OSInfo .getHardwareName ();
103- logger .info ("Hardware name: " + hardware );
102+ public void displayOSInfo () {
103+ logger .info ("Hardware name: " + OSInfo .getHardwareName ());
104+ logger .info ("OS name: " + OSInfo .getOSName ());
105+ logger .info ("Architecture name: " + OSInfo .getArchName ());
104106 }
105107
106108 // it's unlikely we run tests on an Android device
0 commit comments