paulsp      2002/11/23 03:46:57

  Modified:    src/java/org/apache/jetspeed/util TestMimeType.java
  Log:
  Formatting changes directed by checkstyle.
  No functional changes.
  
  Revision  Changes    Path
  1.3       +25 -35    
jakarta-jetspeed/src/java/org/apache/jetspeed/util/TestMimeType.java
  
  Index: TestMimeType.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/util/TestMimeType.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestMimeType.java 23 Nov 2002 10:16:26 -0000      1.2
  +++ TestMimeType.java 23 Nov 2002 11:46:57 -0000      1.3
  @@ -54,11 +54,6 @@
   
   package org.apache.jetspeed.util;
   
  -// Java imports
  -
  -// ECS imports
  -import org.apache.ecs.ConcreteElement;
  -
   // Junit imports
   import junit.awtui.TestRunner;
   import junit.framework.Test;
  @@ -72,16 +67,13 @@
   // Jetspeed imports
   import org.apache.jetspeed.capability.CapabilityMap;
   import org.apache.jetspeed.om.profile.Profile;
  -import org.apache.jetspeed.om.profile.ProfileLocator;
  -import org.apache.jetspeed.om.profile.PSMLDocument;
   import org.apache.jetspeed.services.Profiler;
  -import org.apache.jetspeed.services.JetspeedSecurity;
   import org.apache.jetspeed.services.resources.JetspeedResources;
   import org.apache.jetspeed.services.rundata.JetspeedRunData;
   import org.apache.jetspeed.test.TurbineTestUtilities;
   
   // Turbine imports
  -import org.apache.turbine.om.security.User;
  +//import org.apache.turbine.om.security.User;
   import org.apache.turbine.services.pull.TurbinePull;
   import org.apache.turbine.services.velocity.TurbineVelocity;
   import org.apache.turbine.util.RunData;
  @@ -98,15 +90,15 @@
   
   public class TestMimeType extends ServletTestCase
   {
  -    private static String TEST_ANON_USER_NAME = "";
  -    private static String TEST_CONTEXT = null;
  -    private static String TEST_DEFAULT_PAGE = "default";
  -    private static String TEST_HOST = "localhost";
  -    private static String TEST_SERVLET = "/portal";
  -    private static String TEST_GROUP = "apache";
  -    private static String TEST_PAGE = "news";
  -    private static String TEST_USER = "turbine";
  -    private static String TEST_USER_PASSWORD ="turbine";
  +    private static final String TEST_ANON_USER_NAME = "";
  +    private static final String TEST_CONTEXT = null;
  +    private static final String TEST_DEFAULT_PAGE = "default";
  +    private static final String TEST_HOST = "localhost";
  +    private static final String TEST_SERVLET = "/portal";
  +    private static final String TEST_GROUP = "apache";
  +    private static final String TEST_PAGE = "news";
  +    private static final String TEST_USER = "turbine";
  +    private static final String TEST_USER_PASSWORD = "turbine";
       
       private RunData rundata = null;
   
  @@ -117,7 +109,7 @@
        */
       public TestMimeType(String name)
       {
  -        super( name );
  +        super(name);
       }
   
       /**
  @@ -127,7 +119,7 @@
        */
       public static void main(String args[])
       {
  -        TestRunner.main( new String[] { TestMimeType.class.getName() } );
  +        TestRunner.main(new String[] { TestMimeType.class.getName() });
       }
       
       /**
  @@ -139,7 +131,7 @@
       public static Test suite()
       {
           // All methods starting with "test" will be executed in the test suite.
  -        return new TestSuite( TestMimeType.class );
  +        return new TestSuite(TestMimeType.class);
       }
       
       /**
  @@ -172,32 +164,32 @@
       public void testDefaultURL() throws Exception
       {
           // Create the RunData object to be used during testing.        
  -        rundata = RunDataFactory.getRunData ( request, response, config );
  -        assertNotNull( "Got rundata", rundata);
  +        rundata = RunDataFactory.getRunData(request, response, config);
  +        assertNotNull("Got rundata", rundata);
           TurbineTestUtilities.setupRunData(rundata);
   
           // Verify we have a CapabilityMap
  -        CapabilityMap cm = ((JetspeedRunData)rundata).getCapability();
  -        assertNotNull( "Got Capability", cm);
  +        CapabilityMap cm = ((JetspeedRunData) rundata).getCapability();
  +        assertNotNull("Got Capability", cm);
   
           // Verify we have a profile
           Profile profile = Profiler.getProfile(rundata);
  -        assertNotNull( "Got profile from Profiler", profile);
  +        assertNotNull("Got profile from Profiler", profile);
           System.out.println("DocumentName = " + profile.getDocument().getName()); 
   
           // Get and populate the context
           Context context = TurbineVelocity.getContext(rundata);
  -        assertNotNull( "Got context", context);
  -        TurbinePull.populateContext( context, rundata);
  +        assertNotNull("Got context", context);
  +        TurbinePull.populateContext(context, rundata);
   
           // Verify tool are in the context
  -        assertNotNull( "Got jlink from context", context.get("jlink"));
  +        assertNotNull("Got jlink from context", context.get("jlink"));
   
           // Generatate and output thre page
           TurbineTestUtilities.generatePage(rundata);
  -        assertEquals( "Verifying page's character set",
  +        assertEquals("Verifying page's character set",
               rundata.getCharSet(), 
  -            JetspeedResources.getString(JetspeedResources.CONTENT_ENCODING_KEY, 
"utf-8") );
  +            JetspeedResources.getString(JetspeedResources.CONTENT_ENCODING_KEY, 
"utf-8"));
   
           TurbineTestUtilities.outputPage(rundata);
   
  @@ -205,10 +197,8 @@
           RunDataFactory.putRunData(rundata);
       }
   
  -    public void endDefaultURL(org.apache.cactus.WebResponse theResponse)
  +    public void endDefaultURL(WebResponse theResponse)
       {
           System.out.println("text length = " + theResponse.getText().length());
  -//        System.out.println("text length = " + theResponse.getText());
       }
  -
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to