1
edit
Changes
→Apache Excalibur
=== Apache Excalibur===
The following examples shows that class are portions of the code found in '''CascadingErrorTestCase.java''' is extending from an abstract class called and '''TestCaseCascadingExceptionTestCase.java'''files.<br/>When comparing these two files, possibly in we can see that the two files share a common package '''junitorg.apache.avalon.framework.TestCasetest''' package. In this case, the '''testConstructor()''' and the '''testGetCause()''' would be the altered for testing purposes.
<pre>
package org.apache.avalon.framework.test;
import junit.framework.TestCase;
</**pre> * From the following, we can see that the class '''CascadingErrorTestCase''' is extending from an abstract class called '''TestCase'''. This is the same case in the '''CascadingExceptionTestCase.java''' file. Hence, this shows that these two classes are subclasses of the class '''TestCase for {@link CascadingError}'''. * * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</apre> * @version $Id$ */
public class CascadingErrorTestCase extends TestCase
{
}
</pre>
When looking at the testConstructor() in both files, we can see that it implements different methods, therefore its altering the algorithm operation of the file. The general steps in the constructor is not altered, but the implementation is different.
<pre>
// From CascadingErrorTestCase.java
public void testConstructor()
{
//assertNotNull( new CascadingError() );
}
</pre> public void testGetCause()<pre>
{
}
</pre>