1 17 package org.apache.excalibur.util.test; 18 19 import junit.framework.TestCase; 20 21 import org.apache.excalibur.util.SystemUtil; 22 23 28 public final class SystemUtilTestCase 29 extends TestCase 30 { 31 public SystemUtilTestCase( String name ) 32 { 33 super( name ); 34 } 35 36 public void testSystemUtil() 37 { 38 System.out.println( "Number of Processors: " + SystemUtil.numProcessors() ); 39 System.out.println( "CPU Info: " + SystemUtil.cpuInfo() ); 40 System.out.println( "Architecture: " + SystemUtil.architecture() ); 41 System.out.println( "Operating System: " + SystemUtil.operatingSystem() ); 42 System.out.println( "OS Version: " + SystemUtil.osVersion() ); 43 44 assertEquals( SystemUtil.architecture(), System.getProperty( "os.arch" ) ); 45 assertEquals( SystemUtil.operatingSystem(), System.getProperty( "os.name" ) ); 46 assertEquals( SystemUtil.osVersion(), System.getProperty( "os.version" ) ); 47 } 48 } 49 | Popular Tags |