View Javadoc

1   package net.sf.madmap;
2   
3   import junit.framework.Test;
4   import junit.framework.TestCase;
5   import junit.framework.TestSuite;
6   
7   /**
8    * Unit test for simple App.
9    */
10  public class AppTest 
11      extends TestCase
12  {
13  	Madmap	_owner;
14  
15  	/**
16       * Create the test case
17       *
18       * @param testName name of the test case
19       */
20      public AppTest( String testName )
21      {
22          super( testName );
23      }
24  
25      /**
26       * @return the suite of tests being tested
27       */
28      public static Test suite()
29      {
30          return new TestSuite( AppTest.class );
31      }
32  
33      /**
34       * Rigourous Test :-)
35       */
36      public void testApp()
37      {
38          _owner = new Madmap( "src/test/resources/memtest2.hprof.txt");
39          MadmapMain._nogui = true;
40          MadmapMain._verbose = true;
41          //MadmapMain._runDumpPhase = true;
42          _owner.init();
43         assertNotNull( _owner );
44      }
45  
46      /**
47       * Rigourous Test :-)
48       */
49      public void testApp2()
50      {
51          _owner = new Madmap( "src/test/resources/memtest2.hprof.txt");
52          MadmapMain._nogui = true;
53          MadmapMain.setVerbose(true);
54          MadmapMain.setSaveMemberNames(false);
55          //MadmapMain._runDumpPhase = true;
56          _owner.init();
57         assertNotNull( _owner );
58      }
59  }