commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit AssertEqualsTag.java CaseTag.java AssertTagSupport.java RunTag.java AssertTag.java SuiteTag.java JellyTestSuite.java FailTag.java
Date Thu, 09 Sep 2004 12:14:39 GMT
dion        2004/09/09 05:14:39

  Modified:    jelly/jelly-tags/junit/src/test/org/apache/commons/jelly/tags/junit
                        TestJUnit.java
               jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit
                        AssertEqualsTag.java CaseTag.java
                        AssertTagSupport.java RunTag.java AssertTag.java
                        SuiteTag.java JellyTestSuite.java FailTag.java
  Log:
  Fix license file whitespace
  
  Revision  Changes    Path
  1.4       +6 -6      jakarta-commons/jelly/jelly-tags/junit/src/test/org/apache/commons/jelly/tags/junit/TestJUnit.java
  
  Index: TestJUnit.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/junit/src/test/org/apache/commons/jelly/tags/junit/TestJUnit.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestJUnit.java	25 Feb 2004 01:31:57 -0000	1.3
  +++ TestJUnit.java	9 Sep 2004 12:14:38 -0000	1.4
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -18,7 +18,7 @@
   import junit.framework.TestSuite;
   import junit.textui.TestRunner;
   
  -/** 
  +/**
    * A helper class to run jelly test cases as part of Ant's JUnit tests
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  @@ -29,8 +29,8 @@
       public static void main( String[] args ) throws Exception {
           TestRunner.run( suite() );
       }
  -    
  +
       public static TestSuite suite() throws Exception {
  -        return createTestSuite(TestJUnit.class, "suite.jelly");        
  +        return createTestSuite(TestJUnit.class, "suite.jelly");
       }
   }
  
  
  
  1.5       +21 -21    jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/AssertEqualsTag.java
  
  Index: AssertEqualsTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/AssertEqualsTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AssertEqualsTag.java	25 Feb 2004 01:31:53 -0000	1.4
  +++ AssertEqualsTag.java	9 Sep 2004 12:14:38 -0000	1.5
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -19,7 +19,7 @@
   import org.apache.commons.jelly.XMLOutput;
   import org.apache.commons.jelly.expression.Expression;
   
  -/** 
  +/**
    * Compares an actual object against an expected object and if they are different
    * then the test will fail.
    *
  @@ -30,42 +30,42 @@
   
       private Expression actual;
       private Expression expected;
  -    
  +
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           String message = getBodyText();
   
  -        Object expectedValue = expected.evaluate(context);                    
  -        Object actualValue = actual.evaluate(context);                    
  -        
  +        Object expectedValue = expected.evaluate(context);
  +        Object actualValue = actual.evaluate(context);
  +
           if (expectedValue == null && actualValue == null) {
               return;
           }
  -        if (actualValue != null && expectedValue.equals(actualValue)) {       
    
  +        if (actualValue != null && expectedValue.equals(actualValue)) {
               return;
           }
   
  -        String expressions = "\nExpected expression: " 
  -            + expected.getExpressionText() 
  -            + "\nActual expression: " 
  +        String expressions = "\nExpected expression: "
  +            + expected.getExpressionText()
  +            + "\nActual expression: "
               + actual.getExpressionText();
  -        
  +
           failNotEquals(message, expectedValue, actualValue, expressions);
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------       
        
  -    
  -    /** 
  -     * Sets the actual value which will be compared against the 
  +    //-------------------------------------------------------------------------
  +
  +    /**
  +     * Sets the actual value which will be compared against the
        * expected value.
        */
       public void setActual(Expression actual) {
           this.actual = actual;
       }
  -    
  +
       /**
        * Sets the expected value to be tested against
        */
  
  
  
  1.5       +18 -18    jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/CaseTag.java
  
  Index: CaseTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/CaseTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CaseTag.java	25 Feb 2004 01:31:53 -0000	1.4
  +++ CaseTag.java	9 Sep 2004 12:14:38 -0000	1.5
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -23,7 +23,7 @@
   import org.apache.commons.jelly.TagSupport;
   import org.apache.commons.jelly.XMLOutput;
   
  -/** 
  +/**
    * Represents a single test case in a test suite; this tag is analagous to
    * JUnit's TestCase class.
    *
  @@ -33,16 +33,16 @@
   public class CaseTag extends TagSupport {
   
       private String name;
  -    
  -    
  +
  +
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(final XMLOutput output) throws JellyTagException {
           String name = getName();
           if ( name == null ) {
               name = toString();
           }
  -        
  +
           // #### we need to redirect the output to a TestListener
           // or something?
           TestCase testCase = new TestCase(name) {
  @@ -50,16 +50,16 @@
                   // create a new child context so that each test case
                   // will have its own variable scopes
                   JellyContext newContext = new JellyContext( context );
  -                
  +
                   // disable inheritence of variables and tag libraries
                   newContext.setExportLibraries(false);
                   newContext.setExport(false);
  -                
  +
                   // invoke the test case
                   getBody().run(newContext, output);
               }
           };
  -        
  +
           // lets find the test suite
           TestSuite suite = getSuite();
           if ( suite == null ) {
  @@ -67,9 +67,9 @@
           }
           suite.addTest(testCase);
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------       
        
  +    //-------------------------------------------------------------------------
   
       /**
        * @return the name of this test case
  @@ -77,16 +77,16 @@
       public String getName() {
           return name;
       }
  -    
  -    /** 
  +
  +    /**
        * Sets the name of this test case
        */
       public void setName(String name) {
           this.name = name;
       }
  -    
  +
       // Implementation methods
  -    //-------------------------------------------------------------------------       
        
  +    //-------------------------------------------------------------------------
   
       /**
        * Strategy method to find the corrent TestSuite to add a new Test case to
  
  
  
  1.4       +12 -12    jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/AssertTagSupport.java
  
  Index: AssertTagSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/AssertTagSupport.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AssertTagSupport.java	25 Feb 2004 01:31:53 -0000	1.3
  +++ AssertTagSupport.java	9 Sep 2004 12:14:38 -0000	1.4
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -17,10 +17,10 @@
   
   import org.apache.commons.jelly.xpath.XPathTagSupport;
   
  -/** 
  +/**
    * The abstract base class of any assertion tag which is
    * useful for implementation inheritence.
  - * 
  + *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision$
    */
  @@ -30,15 +30,15 @@
       }
   
       // Implementation methods
  -    //-------------------------------------------------------------------------       
        
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
  -     * Produces a failure assertion with the given message 
  +     * Produces a failure assertion with the given message
        */
       protected void fail(String message) throws JellyAssertionFailedError {
           throw new JellyAssertionFailedError(message);
       }
  -    
  +
       /**
        * Produces a failure assertion with the given message and added detail.
        */
  @@ -50,7 +50,7 @@
               fail(message + ". Assertion failed while " + detail);
           }
       }
  -    
  +
       /**
        * Produces a failure if the actual value was not equal to the expected value
        */
  @@ -61,5 +61,5 @@
           }
           fail(formatted + "expected:[" + expected + "] but was:[" + actual + "]" + expressions);
       }
  -    
  +
   }
  
  
  
  1.5       +26 -26    jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/RunTag.java
  
  Index: RunTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/RunTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RunTag.java	25 Feb 2004 01:31:53 -0000	1.4
  +++ RunTag.java	9 Sep 2004 12:14:38 -0000	1.5
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -32,7 +32,7 @@
   import org.xml.sax.SAXException;
   import org.xml.sax.helpers.AttributesImpl;
   
  -/** 
  +/**
    * This tag will run the given Test which could be an individual TestCase or a TestSuite.
    * The TestResult can be specified to capture the output, otherwise the results are output
    * as XML so that they can be formatted in some custom manner.
  @@ -44,24 +44,24 @@
   
       /** The Log to which logging calls will be made. */
       private static final Log log = LogFactory.getLog(RunTag.class);
  -    
  +
       private Test test;
       private TestResult result;
       private TestListener listener;
  -    
  +
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException
{
           Test test = getTest();
           if ( test == null ) {
  -            test = (Test) context.getVariable("org.apache.commons.jelly.junit.suite");
       
  +            test = (Test) context.getVariable("org.apache.commons.jelly.junit.suite");
           }
           if ( test == null ) {
               throw new MissingAttributeException( "test" );
           }
           TestResult result = getResult();
           if ( result == null ) {
  -            result = createResult(output);                    
  +            result = createResult(output);
           }
           TestListener listener = getListener();
           if ( listener == null ) {
  @@ -70,9 +70,9 @@
           result.addListener(listener);
           test.run(result);
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------       
        
  +    //-------------------------------------------------------------------------
   
       /**
        * Returns the TestResult used to capture the output of the test.
  @@ -125,7 +125,7 @@
   
   
       // Implementation methods
  -    //-------------------------------------------------------------------------       
        
  +    //-------------------------------------------------------------------------
   
       /**
        * Factory method to create a new TestResult to capture the output of
  @@ -134,51 +134,51 @@
       protected TestResult createResult(XMLOutput output) {
           return new TestResult();
       }
  -    
  +
       /**
        * Factory method to create a new TestListener to capture the output of
        * the test cases
  -     */    
  +     */
       protected TestListener createTestListener(final XMLOutput output) {
           return new TestListener() {
               public void addError(Test test, Throwable t) {
                   try {
                       output.startElement("error");
  -    
  +
                       output.startElement("message");
                       output.write(t.getMessage());
                       output.endElement("message");
  -    
  +
                       output.startElement("stack");
                       output.write( stackTraceToString(t) );
                       output.endElement("stack");
  -    
  +
                       output.endElement("error");
                   }
                   catch (SAXException e) {
                       handleSAXException(e);
                   }
               }
  -            
  +
               public void addFailure(Test test, AssertionFailedError t) {
                   try {
                       output.startElement("failure");
  -    
  +
                       output.startElement("message");
                       output.write(t.getMessage());
                       output.endElement("message");
  -    
  +
                       output.startElement("stack");
                       output.write( stackTraceToString(t) );
                       output.endElement("stack");
  -    
  +
                       output.endElement("failure");
                   }
                   catch (SAXException e) {
                       handleSAXException(e);
                   }
               }
  -            
  +
               public void endTest(Test test) {
                   try {
                       output.endElement("test");
  @@ -187,13 +187,13 @@
                       handleSAXException(e);
                   }
               }
  -            
  +
               public void startTest(Test test) {
                   try {
                       String name = test.toString();
                       AttributesImpl attributes = new AttributesImpl();
                       attributes.addAttribute("", "name", "name", "CDATA", name);
  -                    
  +
                       output.startElement("test", attributes);
                   }
                   catch (SAXException e) {
  @@ -211,7 +211,7 @@
           t.printStackTrace(new PrintWriter(writer));
           return writer.toString();
       }
  -    
  +
       /**
        * Handles SAX Exceptions
        */
  
  
  
  1.5       +12 -12    jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/AssertTag.java
  
  Index: AssertTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/AssertTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AssertTag.java	25 Feb 2004 01:31:53 -0000	1.4
  +++ AssertTag.java	9 Sep 2004 12:14:38 -0000	1.5
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -26,7 +26,7 @@
   import org.jaxen.JaxenException;
   import org.jaxen.XPath;
   
  -/** 
  +/**
    * Performs an assertion that a given boolean expression, or XPath expression is
    * true. If the expression returns false then this test fails.
    *
  @@ -37,10 +37,10 @@
   
       /** The Log to which logging calls will be made. */
       private static final Log log = LogFactory.getLog(AssertTag.class);
  -    
  +
       /** The expression to evaluate. */
       private Expression test;
  -    
  +
       /** The XPath expression to evaluate */
       private XPath xpath;
   
  @@ -48,7 +48,7 @@
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException
{
           if (test == null && xpath == null) {
               throw new MissingAttributeException( "test" );
  @@ -71,11 +71,11 @@
           }
   
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------       
        
  +    //-------------------------------------------------------------------------
   
  -    /** 
  +    /**
        * Sets the boolean expression to evaluate. If this expression returns true
        * then the test succeeds otherwise if it returns false then the text will
        * fail with the content of the tag being the error message.
  @@ -84,7 +84,7 @@
           this.test = test;
       }
   
  -    /** 
  +    /**
        * Sets the boolean XPath expression to evaluate. If this expression returns true
        * then the test succeeds otherwise if it returns false then the text will
        * fail with the content of the tag being the error message.
  
  
  
  1.5       +24 -24    jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/SuiteTag.java
  
  Index: SuiteTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/SuiteTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SuiteTag.java	25 Feb 2004 01:31:53 -0000	1.4
  +++ SuiteTag.java	9 Sep 2004 12:14:38 -0000	1.5
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -22,7 +22,7 @@
   import org.apache.commons.jelly.TagSupport;
   import org.apache.commons.jelly.XMLOutput;
   
  -/** 
  +/**
    * Represents a collection of TestCases.. This tag is analagous to
    * JUnit's TestSuite class.
    *
  @@ -33,29 +33,29 @@
   
       /** the test suite this tag created */
       private TestSuite suite;
  -    
  +
       /** the name of the variable of the test suite */
       private String var;
  -    
  +
       /** the name of the test suite to create */
       private String name;
   
       public SuiteTag() {
       }
  -    
  +
       /**
        * Adds a new Test to this suite
        */
       public void addTest(Test test) {
           getSuite().addTest(test);
  -    }    
  -    
  +    }
  +
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           suite = createSuite();
  -        
  -        TestSuite parent = (TestSuite) context.getVariable("org.apache.commons.jelly.junit.suite");
       
  +
  +        TestSuite parent = (TestSuite) context.getVariable("org.apache.commons.jelly.junit.suite");
           if ( parent == null ) {
               context.setVariable("org.apache.commons.jelly.junit.suite", suite );
           }
  @@ -64,42 +64,42 @@
           }
   
           invokeBody(output);
  -        
  +
           if ( var != null ) {
               context.setVariable(var, suite);
  -        }            
  +        }
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------       
        
  +    //-------------------------------------------------------------------------
       public TestSuite getSuite() {
           return suite;
       }
  -    
  +
       /**
        * Sets the name of the test suite whichi is exported
        */
       public void setVar(String var) {
           this.var = var;
       }
  -    
  +
       /**
        * @return the name of this test suite
        */
       public String getName() {
           return name;
       }
  -    
  -    /** 
  +
  +    /**
        * Sets the name of this test suite
        */
       public void setName(String name) {
           this.name = name;
       }
  -    
  +
       // Implementation methods
  -    //-------------------------------------------------------------------------       
        
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
        * Factory method to create a new TestSuite
        */
  
  
  
  1.4       +14 -14    jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/JellyTestSuite.java
  
  Index: JellyTestSuite.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/JellyTestSuite.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JellyTestSuite.java	25 Feb 2004 01:31:53 -0000	1.3
  +++ JellyTestSuite.java	9 Sep 2004 12:14:38 -0000	1.4
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -24,7 +24,7 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  -/** 
  +/**
    * An abstract base class for creating a TestSuite via a Jelly script.
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  @@ -38,14 +38,14 @@
   
       /**
        * Helper method to create a test suite from a file name on the class path
  -     * in the package of the given class. 
  -     * For example a test could call 
  +     * in the package of the given class.
  +     * For example a test could call
        * <code>
        * createTestSuite( Foo.class, "suite.jelly" );
        * </code>
  -     * which would loaad the 'suite.jelly script from the same package as the Foo 
  +     * which would loaad the 'suite.jelly script from the same package as the Foo
        * class on the classpath.
  -     * 
  +     *
        * @param testClass is the test class used to load the script via the classpath
        * @param script is the name of the script, which is typically just a name, no directory.
        * @return a newly created TestSuite
  @@ -53,17 +53,17 @@
       public static TestSuite createTestSuite(Class testClass, String script) throws Exception
{
           URL url = testClass.getResource(script);
           if ( url == null ) {
  -            throw new Exception( 
  -                "Could not find Jelly script: " + script 
  -                + " in package of class: " + testClass.getName() 
  +            throw new Exception(
  +                "Could not find Jelly script: " + script
  +                + " in package of class: " + testClass.getName()
               );
           }
           return createTestSuite( url );
       }
  -        
  +
       /**
        * Helper method to create a test suite from the given Jelly script
  -     * 
  +     *
        * @param script is the URL to the script which should create a TestSuite
        * @return a newly created TestSuite
        */
  
  
  
  1.5       +11 -11    jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/FailTag.java
  
  Index: FailTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/FailTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FailTag.java	25 Feb 2004 01:31:53 -0000	1.4
  +++ FailTag.java	9 Sep 2004 12:14:38 -0000	1.5
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -18,7 +18,7 @@
   import org.apache.commons.jelly.JellyTagException;
   import org.apache.commons.jelly.XMLOutput;
   
  -/** 
  +/**
    * This tag causes a failure message. The message can either
    * be specified in the tags body or via the message attribute.
    *
  @@ -33,7 +33,7 @@
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           String message = getMessage();
           if ( message == null ) {
  @@ -41,9 +41,9 @@
           }
           fail( message );
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------       
        
  +    //-------------------------------------------------------------------------
   
       /**
        * @return the failure message
  @@ -51,9 +51,9 @@
       public String getMessage() {
           return message;
       }
  -    
  -    
  -    /** 
  +
  +
  +    /**
        * Sets the failure message. If this attribute is not specified then the
        * body of this tag will be used instead.
        */
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message