jicarilla-sandbox/platform/framework/impl/src/test/org/jicarilla/framework/test AbstracActiveTestCase.java,NONE,1.1 AbstracAsyncEnabledTestCase.java,NONE,1.1 AbstracExecutableTestCase.java,NONE,1.1 AbstracReadonlyEnabledTestCase.java,NONE,1.1 LifecycleUtilTestCase.java,1.2,1.3 AbstractActiveTestCase.java,1.2,NONE AbstractAsyncEnabledTestCase.java,1.2,NONE AbstractExecutableTestCase.java,1.2,NONE AbstractReadonlyEnabledTestCase.java,1.2,NONE

Leo Simons <[email protected]>
Newsgroups gmane.comp.java.jicarilla.cvs
Message-ID <[email protected]>
Update of /cvsroot/jicarilla/jicarilla-sandbox/platform/framework/impl/src/test/org/jicarilla/framework/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30946/framework/impl/src/test/org/jicarilla/framework/test

Modified Files:
	LifecycleUtilTestCase.java 
Added Files:
	AbstracActiveTestCase.java AbstracAsyncEnabledTestCase.java 
	AbstracExecutableTestCase.java 
	AbstracReadonlyEnabledTestCase.java 
Removed Files:
	AbstractActiveTestCase.java AbstractAsyncEnabledTestCase.java 
	AbstractExecutableTestCase.java 
	AbstractReadonlyEnabledTestCase.java 
Log Message:
s/Abstract.*TestCase\.java/Abstrac\1TestCase\.java/

--- NEW FILE: AbstracReadonlyEnabledTestCase.java ---
/* ====================================================================
 The Jicarilla Software License

 Copyright (c) 2003 Leo Simons.
 All rights reserved.

 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
 "Software"), to deal in the Software without restriction, including
 without limitation the rights to use, copy, modify, merge, publish,
 distribute, sublicense, and/or sell copies of the Software, and to
 permit persons to whom the Software is furnished to do so, subject to
 the following conditions:

 The above copyright notice and this permission notice shall be
 included in all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
==================================================================== */
package org.jicarilla.framework.test;

import org.jicarilla.framework.AbstractReadonlyEnabled;
import junit.framework.TestCase;

/**
 * <a href="http://www.junit.org/">JUnit</a> {@link TestCase testcase} for
 * AbstractReadonlyEnabled.
 * 
 * @author <a href="lsimons at jicarilla dot org">Leo Simons</a>
 * @version $Id: AbstracReadonlyEnabledTestCase.java,v 1.1 2003/11/17 21:11:10
 *          lsimons Exp $
 */
public class AbstracReadonlyEnabledTestCase extends TestCase
{
    public static class Readonly extends AbstractReadonlyEnabled
    {
        public void makeReadOnly()
        {
            super.makeReadOnly();
        }

        /**
         * Determine whether makeReadOnly() has been called.
         */
        protected boolean isReadOnly()
        {
            return super.isReadOnly();
        }

        /**
         * Throw an IllegalStateException if makeReadOnly() has been called.
         */
        protected void checkReadOnly()
        {
            super.checkReadOnly();
        }
    }

    public void testIsReadonly()
    {
        Readonly r = new Readonly();
        assertFalse( r.isReadOnly() );

        r.makeReadOnly();
        assertTrue( r.isReadOnly() );

        // multiple
        r.makeReadOnly();
        r.makeReadOnly();
        r.makeReadOnly();
        r.makeReadOnly();
        assertTrue( r.isReadOnly() );

    }

    public void testCheckReadonly()
    {
        Readonly r = new Readonly();
        r.checkReadOnly();

        // multiple
        r.checkReadOnly();
        r.checkReadOnly();
        r.checkReadOnly();
        r.checkReadOnly();

        r.makeReadOnly();

        // multiple
        for( int i = 0; i < 5; i++ )
        {
            IllegalStateException ise = null;
            try
            {
                r.checkReadOnly();
            }
            catch( IllegalStateException e )
            {
                ise = e;
            }
            assertNotNull( ise );
        }
    }
}

--- NEW FILE: AbstracActiveTestCase.java ---
/* ====================================================================
 The Jicarilla Software License

 Copyright (c) 2003 Leo Simons.
 All rights reserved.

 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
 "Software"), to deal in the Software without restriction, including
 without limitation the rights to use, copy, modify, merge, publish,
 distribute, sublicense, and/or sell copies of the Software, and to
 permit persons to whom the Software is furnished to do so, subject to
 the following conditions:

 The above copyright notice and this permission notice shall be
 included in all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
==================================================================== */
package org.jicarilla.framework.test;

import org.jicarilla.framework.AbstractActive;
import org.jicarilla.framework.Recyclable;
import junit.framework.TestCase;

/**
 * <a href="http://www.junit.org/">JUnit</a> {@link TestCase testcase} for
 * AbstracActiveTestCase.
 * 
 * @author <a href="lsimons at jicarilla dot org">Leo Simons</a>
 * @version $Id: AbstracActiveTestCase.java,v 1.1 2003/11/17 21:11:10 lsimons
 *          Exp $
 */
public class AbstracActiveTestCase extends TestCase
{
    public static class ActiveImpl extends AbstractActive
    {
        public Throwable m_initializeThrowable;
        public RuntimeException m_disposeThrowable;

        public ActiveImpl( Throwable initializeThrowable,
                RuntimeException disposeThrowable )
        {
            m_initializeThrowable = initializeThrowable;
            m_disposeThrowable = disposeThrowable;
        }

        public boolean isRunning()
        {
            return super.isActive();
        }

        public boolean isStopped()
        {
            return super.isDisposed();
        }

        public boolean isDidInitialize()
        {
            return super.isInitialized();
        }

        public boolean isDidDispose()
        {
            return super.isDisposed();
        }

        public void doInitialize()
                throws Throwable
        {
            super.doInitialize();

            if( m_initializeThrowable != null )
            {
                throw m_initializeThrowable;
            }
        }

        public void doDispose() throws Throwable
        {
            super.doDispose();

            if( m_disposeThrowable != null )
            {
                throw m_disposeThrowable;
            }
        }

        public void doStuff()
        {
            super.checkActive();

            // do stuff
        }

        public void doStuffLazily() throws Throwable
        {
            super.lazyInitialization();
        }
    }

    public final static class ActiveRecyclableImpl extends ActiveImpl
            implements Recyclable
    {
        public ActiveRecyclableImpl( Throwable initializeThrowable,
                RuntimeException disposeThrowable )
        {
            super( initializeThrowable, disposeThrowable );
        }

        public void recycle()
        {
        }
    }

    ActiveImpl act = new ActiveImpl( null, null );

    public void testRunningFlag() throws Throwable
    {
        assertFalse( act.isRunning() );
        act.initialize();
        assertTrue( act.isRunning() );
        act.dispose();
        assertFalse( act.isRunning() );
    }

    public void testStoppedFlag() throws Throwable
    {
        assertFalse( act.isStopped() );
        act.initialize();
        assertFalse( act.isStopped() );
        act.dispose();
        assertTrue( act.isStopped() );
    }

    public void testDoInitializeIsCalled() throws Throwable
    {
        assertFalse( act.isDidInitialize() );
        act.initialize();
        assertTrue( act.isDidInitialize() );
    }

    public void testDoDisposeIsCalled() throws Throwable
    {
        assertFalse( act.isDidDispose() );
        act.initialize();
        act.dispose();
        assertTrue( act.isDidDispose() );
    }

    public void testInitializeMultipleIsOkay() throws Throwable
    {
        act.initialize();
        act.initialize();
        act.initialize();
        act.initialize();
        act.initialize();
    }

    public void testDisposeMultipleIsOkay() throws Throwable
    {
        act.initialize();
        act.dispose();
        act.dispose();
        act.dispose();
        act.dispose();
    }

    public void testInitializePropagatesException()
    {
        Exception ex = new Exception();
        act = new ActiveImpl( ex, null );

        Throwable t = null;
        try
        {
            act.initialize();
        }
        catch( Throwable th )
        {
            t = th;
        }
        assertNotNull( t );
        assertEquals( ex, t );
    }

    public void testDisposePropagatesException() throws Throwable
    {
        RuntimeException ex = new RuntimeException();
        act = new ActiveImpl( null, ex );
        act.initialize();

        Throwable t = null;
        try
        {
            act.dispose();
        }
        catch( RuntimeException re )
        {
            t = re;
        }
        assertNotNull( t );
        assertEquals( ex, t );
    }

    public void testCheckActive() throws Throwable
    {
        Throwable t = null;
        try
        {
            act.doStuff();
        }
        catch( AssertionError th )
        {
            t = th;
        }
        assertNotNull( t );

        act.initialize();
        act.doStuff();
        act.doStuff();
        act.doStuff();
        act.dispose();

        t = null;
        try
        {
            act.doStuff();
        }
        catch( AssertionError th )
        {
            t = th;
        }
        assertNotNull( t );
    }

    public void testLazyInitialization() throws Throwable
    {
        act.doStuffLazily();
        assertTrue( act.isDidInitialize() );
        assertTrue( act.isRunning() );

        act.doStuffLazily();
        assertTrue( act.isDidInitialize() );
        assertTrue( act.isRunning() );

        act.dispose();
        assertFalse( act.isRunning() );
        assertTrue( act.isDidDispose() );

        Throwable t = null;
        try
        {
            act.doStuffLazily();
        }
        catch( AssertionError th )
        {
            t = th;
        }
        assertNotNull( t );
        assertFalse( act.isRunning() );

        ActiveRecyclableImpl act2 = new ActiveRecyclableImpl( null, null );
        act2.doStuffLazily();
        assertTrue( act2.isDidInitialize() );
        assertTrue( act2.isRunning() );

        act2.doStuffLazily();
        assertTrue( act2.isDidInitialize() );
        assertTrue( act2.isRunning() );

        act2.dispose();
        assertFalse( act2.isRunning() );
        assertTrue( act2.isDidDispose() );

        // now this is okay
        act2.doStuffLazily();
        assertTrue( act2.isDidInitialize() );
        assertTrue( act2.isRunning() );
        assertFalse( act2.isDidDispose() );
        act2.doStuffLazily();
    }
}

--- AbstractReadonlyEnabledTestCase.java DELETED ---

--- AbstractAsyncEnabledTestCase.java DELETED ---

--- NEW FILE: AbstracAsyncEnabledTestCase.java ---
/* ====================================================================
 The Jicarilla Software License

 Copyright (c) 2003 Leo Simons.
 All rights reserved.

 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
 "Software"), to deal in the Software without restriction, including
 without limitation the rights to use, copy, modify, merge, publish,
 distribute, sublicense, and/or sell copies of the Software, and to
 permit persons to whom the Software is furnished to do so, subject to
 the following conditions:

 The above copyright notice and this permission notice shall be
 included in all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
==================================================================== */
package org.jicarilla.framework.test;

import EDU.oswego.cs.dl.util.concurrent.Channel;
import EDU.oswego.cs.dl.util.concurrent.LinkedQueue;
import EDU.oswego.cs.dl.util.concurrent.ThreadedExecutor;
import org.jicarilla.framework.AbstractAsyncEnabled;
import org.jicarilla.framework.ExceptionListener;
import org.jicarilla.framework.Invocation;
import org.jicarilla.framework.NoopExceptionListener;
import junit.framework.TestCase;

import java.lang.reflect.Method;

/**
 * <a href="http://www.junit.org/">JUnit</a> {@link TestCase testcase} for
 * AbstractAsyncEnabled.
 * 
 * @author <a href="lsimons at jicarilla dot org">Leo Simons</a>
 * @version $Id: AbstracAsyncEnabledTestCase.java,v 1.1 2003/11/17 21:11:10
 *          lsimons Exp $
 */
public class AbstracAsyncEnabledTestCase extends TestCase
{
    public final static class Mock
    {
        public boolean called = false;
        public Object result = new Object();

        public Object call()
        {
            called = true;
            privateCall();
            return result;
        }

        private void privateCall() {};
    }

    public final static class MockEx
    {
        public boolean called = false;
        public Exception ex = new Exception();

        public void call() throws Exception
        {
            called = true;
            throw ex;
        }
    }

    public final static class AsyncEnabledImpl
            extends AbstractAsyncEnabled
    {
        public Throwable m_initializeThrowable;
        public RuntimeException m_disposeThrowable;

        public boolean m_didInitialize = false;
        public boolean m_didDispose = false;

        public AsyncEnabledImpl(
                Throwable initializeThrowable,
                RuntimeException disposeThrowable,
                ThreadedExecutor tx )
        {
            super( tx );
            m_initializeThrowable = initializeThrowable;
            m_disposeThrowable = disposeThrowable;
        }

        public AsyncEnabledImpl(
                Throwable initializeThrowable,
                RuntimeException disposeThrowable,
                ThreadedExecutor tx,
                ExceptionListener ex )
        {
            super( tx, ex );
            m_initializeThrowable = initializeThrowable;
            m_disposeThrowable = disposeThrowable;
        }

        public boolean isRunning()
        {
            return m_running;
        }

        public boolean isStopped()
        {
            return m_stopped;
        }

        public boolean isDidInitialize()
        {
            return m_didInitialize;
        }

        public boolean isDidDispose()
        {
            return m_didDispose;
        }

        public void doInitialize()
                throws Throwable
        {
            super.doInitialize();
            m_didInitialize = true;

            if( m_initializeThrowable != null )
            {
                throw m_initializeThrowable;
            }
        }

        public void doDispose()
        {
            super.doDispose();
            m_didDispose = true;

            if( m_disposeThrowable != null )
            {
                throw m_disposeThrowable;
            }
        }

        public Channel getIncoming()
        {
            return m_incoming;
        }

        public Object getImmediateResult( Invocation invocation )
        {
            return super.getImmediateResult( invocation );
        }

        public void doHandle( Invocation i )
        {
            super.doHandle( i );
        }

        public void doHandleException( Invocation i )
        {
            super.doHandleException( i );
        }

        public void work() throws Throwable
        {
            super.work();
        }
    }

    ThreadedExecutor tx = new ThreadedExecutor();
    AsyncEnabledImpl aei = new AsyncEnabledImpl( null, null, tx );

    public void testConstructor()
    {
        assertNotNull( aei.getIncoming() );
        assertTrue( aei.getIncoming() instanceof LinkedQueue );

        aei = new AsyncEnabledImpl( null, null, tx,
                new NoopExceptionListener() );
        assertTrue( aei.getIncoming() instanceof LinkedQueue );
    }

    public void testInitializeDispose() throws Throwable
    {
        aei.initialize();
        aei.dispose();
    }

    public void testGetImmediateResult()
    {
        assertNull( aei.getImmediateResult( null ) );
        assertNull( aei.getImmediateResult( new Invocation() ) );
    }

    public void testHandle() throws Throwable
    {
        Invocation i = new Invocation();
        Object result = aei.handle( i );
        assertNull( result );
        assertEquals( i, aei.getIncoming().take() );

        Throwable t = null;
        try
        {
            aei.handle( null );
        }
        catch( AssertionError ae )
        {
            t = ae;
        }
        assertNotNull( t );
    }

    public void testDoHandle() throws Throwable
    {
        Mock mock = new Mock();
        Object[] args = new Object[0];
        Method m = Mock.class.getMethod( "call", new Class[0] );

        Invocation i = new Invocation( mock, null, m, args );

        aei.doHandle( i );
        assertTrue( mock.called );
        assertEquals( mock.result, i.getResult() );
    }

    public void testDoHandleInCaseOfException() throws Throwable
    {
        MockEx mock = new MockEx();
        Object[] args = new Object[0];
        Method m = MockEx.class.getMethod( "call", new Class[0] );

        Invocation i = new Invocation( mock, mock, m, args );

        aei.doHandle( i );
        assertTrue( mock.called );
        assertEquals( mock.ex, i.getThrowable() );
    }

    public void testDoHandleInCaseOfAccessException() throws Throwable
    {
        Mock mock = new Mock();
        Object[] args = new Object[0];
        Method[] methods = Mock.class.getDeclaredMethods();
        Method m = null;
        for( int i = 0; i < methods.length; i++ )
        {
            if( methods[i].getName().equals( "privateCall" ) )
            {
                m = methods[i];
                break;
            }
        }

        Invocation i = new Invocation( mock, mock, m, args );

        aei.doHandle( i );
        assertTrue( i.getThrowable() instanceof IllegalAccessException );
    }

    public void testDoHandleException() throws Throwable
    {
        aei.doHandleException( new Invocation() );
    }

    public void testWork() throws Throwable
    {
        MockEx mock = new MockEx();
        Object[] args = new Object[0];
        Method m = MockEx.class.getMethod( "call", new Class[0] );

        Invocation i = new Invocation( mock, null, m, args );

        aei.getIncoming().put( i );
        aei.work();
        assertTrue( mock.called );
        assertNull( aei.getIncoming().peek() );
    }
}

--- NEW FILE: AbstracExecutableTestCase.java ---
/* ====================================================================
 The Jicarilla Software License

 Copyright (c) 2003 Leo Simons.
 All rights reserved.

 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
 "Software"), to deal in the Software without restriction, including
 without limitation the rights to use, copy, modify, merge, publish,
 distribute, sublicense, and/or sell copies of the Software, and to
 permit persons to whom the Software is furnished to do so, subject to
 the following conditions:

 The above copyright notice and this permission notice shall be
 included in all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
==================================================================== */
package org.jicarilla.framework.test;

import EDU.oswego.cs.dl.util.concurrent.Executor;
import EDU.oswego.cs.dl.util.concurrent.ThreadedExecutor;
import org.jicarilla.framework.AbstractExecutable;
import org.jicarilla.framework.ExceptionListener;
import org.jicarilla.framework.NoopExceptionListener;
import junit.framework.TestCase;

/**
 * <a href="http://www.junit.org/">JUnit</a> {@link TestCase testcase} for
 * AbstractExecutable.
 * 
 * @author <a href="lsimons at jicarilla dot org">Leo Simons</a>
 * @version $Id: AbstracExecutableTestCase.java,v 1.2 2003/11/18 16:09:16
 *          lsimons Exp $
 */
public class AbstracExecutableTestCase extends TestCase
{
    public static class StoringExceptionListener implements ExceptionListener
    {
        public Throwable t = null;

        public void exceptionOccurred( Throwable th )
        {
            t = th;
        }
    }

    public static class ExecutableImpl extends AbstractExecutable
    {
        public int m_workDone = 0;
        public Throwable m_workException = null;

        public ExecutableImpl(
                Throwable workException,
                Executor executor,
                ExceptionListener listener )
        {
            this( executor, listener );
            m_workException = workException;
        }

        public ExecutableImpl()
        {
            super();
        }

        public ExecutableImpl( Executor executor )
        {
            super( executor );
        }

        public ExecutableImpl( Executor executor, ExceptionListener listener )
        {
            super( executor, listener );
        }

        public Executor getExecutor()
        {
            return m_executor;
        }

        public AbstractExecutable.Worker getWorker()
        {
            return m_worker;
        }

        public ExceptionListener getListener()
        {
            return m_listener;
        }

        public void work() throws Throwable
        {
            super.work();
            m_workDone++;
            if( m_workException != null )
            {
                throw m_workException;
            }
        }
    }

    public void testConstructors()
    {
        ExecutableImpl ex = new ExecutableImpl();
        assertTrue( ex.getExecutor() instanceof ThreadedExecutor );
        //assertNotNull( ex.getListener() );
        //assertTrue( ex.getListener() instanceof NoopExceptionListener );
        assertNull( ex.getListener() );
        assertNull( ex.getWorker() );

        ThreadedExecutor te = new ThreadedExecutor();
        ex = new ExecutableImpl( te );
        assertEquals( te, ex.getExecutor() );
        //assertNotNull( ex.getListener() );
        //assertTrue( ex.getListener() instanceof NoopExceptionListener );
        assertNull( ex.getListener() );
        assertNull( ex.getWorker() );

        NoopExceptionListener nel = new NoopExceptionListener();
        ex = new ExecutableImpl( te, nel );
        assertEquals( te, ex.getExecutor() );
        assertEquals( nel, ex.getListener() );
        assertNull( ex.getWorker() );

        Throwable t = null;
        try
        {
            ex = new ExecutableImpl( null, nel );
        }
        catch( AssertionError ae )
        {
            t = ae;
        }
        assertNotNull( t );

        ex = new ExecutableImpl( te, null );
    }

    public void testInitialize() throws Throwable
    {
        ThreadedExecutor te = new ThreadedExecutor();
        NoopExceptionListener nel = new NoopExceptionListener();

        ExecutableImpl ex = new ExecutableImpl( te, nel );
        assertNull( ex.getWorker() );
        ex.initialize();
        assertNotNull( ex.getWorker() );

        Thread.sleep( 1000 );

        assertTrue( ex.m_workDone > 0 );
    }

    public void testListenToWorkException() throws Throwable
    {
        ThreadedExecutor te = new ThreadedExecutor();
        StoringExceptionListener sel = new StoringExceptionListener();

        Exception e = new Exception();

        ExecutableImpl ex = new ExecutableImpl( e, te, sel );
        ex.initialize();

        Thread.sleep( 500 );

        assertEquals( e, sel.t );
    }

    public void testNoListener() throws Throwable
    {
        ThreadedExecutor te = new ThreadedExecutor();

        Exception e = new Exception();

        ExecutableImpl ex = new ExecutableImpl( e, te, null );
        ex.initialize();
        Thread.sleep( 500 );
    }

    public void testDispose() throws Throwable
    {
        ExecutableImpl ex = new ExecutableImpl();

        ex.initialize();
        Thread.sleep( 500 );
        ex.dispose();
        Thread.sleep( 200 );

        assertNull( ex.getWorker() );
        assertNull( ex.getListener() );
        assertNull( ex.getExecutor() );
    }
}

--- AbstractExecutableTestCase.java DELETED ---

Index: LifecycleUtilTestCase.java
===================================================================
RCS file: /cvsroot/jicarilla/jicarilla-sandbox/platform/framework/impl/src/test/org/jicarilla/framework/test/LifecycleUtilTestCase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- LifecycleUtilTestCase.java	4 Jan 2004 16:10:21 -0000	1.2
+++ LifecycleUtilTestCase.java	17 Mar 2004 20:12:33 -0000	1.3
@@ -38,7 +38,7 @@
  */
 public class LifecycleUtilTestCase extends TestCase
 {
-    AbstractActiveTestCase.ActiveImpl act = new AbstractActiveTestCase.ActiveImpl(
+    AbstracActiveTestCase.ActiveImpl act = new AbstracActiveTestCase.ActiveImpl(
             null, null );
 
     public void testInitialize() throws Throwable

--- AbstractActiveTestCase.java DELETED ---



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.