Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1557 - in development/laboratory/planet/components/fsm: . api/src/main/net/dpml/fsm basic/src/main/net/dpml/fsm/basic basic/src/test/net/dpml/fsm/basic/test

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: niclas AT netcompartner.com
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1557 - in development/laboratory/planet/components/fsm: . api/src/main/net/dpml/fsm basic/src/main/net/dpml/fsm/basic basic/src/test/net/dpml/fsm/basic/test
  • Date: Sat, 22 Jan 2005 14:51:59 +0100

Author: niclas
Date: Sat Jan 22 14:51:58 2005
New Revision: 1557

Added:

development/laboratory/planet/components/fsm/basic/src/test/net/dpml/fsm/basic/test/AbstractTransitionTC.java
(contents, props changed)

development/laboratory/planet/components/fsm/basic/src/test/net/dpml/fsm/basic/test/TransitionComponentTestCase.java
(contents, props changed)

development/laboratory/planet/components/fsm/basic/src/test/net/dpml/fsm/basic/test/TransitionImplTestCase.java
(contents, props changed)
Modified:

development/laboratory/planet/components/fsm/api/src/main/net/dpml/fsm/State.java

development/laboratory/planet/components/fsm/api/src/main/net/dpml/fsm/Transition.java

development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/CommandRuleImpl.java

development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/StateImpl.java

development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/TransitionComponent.java

development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/TransitionImpl.java

development/laboratory/planet/components/fsm/basic/src/test/net/dpml/fsm/basic/test/StateTestCase.java
development/laboratory/planet/components/fsm/index.xml
Log:
Adding more tests to the StateMachine component.

Modified:
development/laboratory/planet/components/fsm/api/src/main/net/dpml/fsm/State.java
==============================================================================
---
development/laboratory/planet/components/fsm/api/src/main/net/dpml/fsm/State.java
(original)
+++
development/laboratory/planet/components/fsm/api/src/main/net/dpml/fsm/State.java
Sat Jan 22 14:51:58 2005
@@ -19,6 +19,7 @@
package net.dpml.fsm;

import java.util.Locale;
+
import java.io.Serializable;

/**

Modified:
development/laboratory/planet/components/fsm/api/src/main/net/dpml/fsm/Transition.java
==============================================================================
---
development/laboratory/planet/components/fsm/api/src/main/net/dpml/fsm/Transition.java
(original)
+++
development/laboratory/planet/components/fsm/api/src/main/net/dpml/fsm/Transition.java
Sat Jan 22 14:51:58 2005
@@ -19,6 +19,7 @@
package net.dpml.fsm;

import java.util.Locale;
+
import java.io.Serializable;

/**

Modified:
development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/CommandRuleImpl.java
==============================================================================
---
development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/CommandRuleImpl.java
(original)
+++
development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/CommandRuleImpl.java
Sat Jan 22 14:51:58 2005
@@ -141,12 +141,13 @@

public int hashCode()
{
- int hash = m_command.hashCode();
- hash = hash >>> m_priority;
+ int cmdHash = m_command.hashCode();
+ int hash = cmdHash + ( ( cmdHash & 31 ) * 16312786 );
+ hash = hash + 61732179 * m_priority + 271234;
if( m_ignoreCase )
- hash = hash >>> 19;
+ hash = hash * 19;
else
- hash = hash >>> 7;
+ hash = hash + 812398721;
return hash;
}


Modified:
development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/StateImpl.java
==============================================================================
---
development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/StateImpl.java
(original)
+++
development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/StateImpl.java
Sat Jan 22 14:51:58 2005
@@ -109,7 +109,8 @@

public int hashCode()
{
- int hash = m_identity.hashCode();
+ int idHash = m_identity.hashCode();
+ int hash = idHash + ( ( idHash & 31 ) * 621836151 );
return hash;
}


Modified:
development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/TransitionComponent.java
==============================================================================
---
development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/TransitionComponent.java
(original)
+++
development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/TransitionComponent.java
Sat Jan 22 14:51:58 2005
@@ -48,7 +48,7 @@
private State m_beginState;
private State m_endState;
private String m_identity;
- private TransitionRule m_Rule;
+ private TransitionRule m_rule;
private ArrayList m_listeners;
private Logger m_logger;

@@ -81,14 +81,14 @@
m_endState = endState;
StateMachine sm = (StateMachine) man.lookup( "fsm" );
sm.addTransition( this );
- m_Rule = (TransitionRule) man.lookup( "rule" );
+ m_rule = (TransitionRule) man.lookup( "rule" );

m_listeners = new ArrayList();
}

public TransitionRule getTransitionRule()
{
- return m_Rule;
+ return m_rule;
}

public State getBeginState()
@@ -178,15 +178,20 @@

final Transition transition = (Transition) o;

- if( ! m_beginState.equals( transition.getBeginState() ) )
+ if( !m_beginState.equals( transition.getBeginState() ) )
{
return false;
}
- if( ! m_endState.equals( transition.getEndState() ) )
+ if( !m_endState.equals( transition.getEndState() ) )
{
return false;
}
- if( ! m_identity.equals( transition.getIdentity() ) )
+ if( !m_identity.equals( transition.getIdentity() ) )
+ {
+ return false;
+ }
+
+ if( !m_rule.equals( transition.getTransitionRule() ) )
{
return false;
}
@@ -196,15 +201,16 @@

public int hashCode()
{
- int result;
- result = m_beginState.hashCode();
- result = ( result >>> 11 ) + m_endState.hashCode();
- result = ( result >>> 17 ) + m_identity.hashCode();
- return result;
+ int hash;
+ hash = m_beginState.hashCode();
+ hash = hash ^ m_endState.hashCode();
+ hash = hash + m_identity.hashCode();
+ hash = hash ^ m_rule.hashCode();
+ return hash;
}

public String toString()
{
- return "transition[" + m_identity +"]";
+ return "Transition[" + m_identity +"]";
}
}

Modified:
development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/TransitionImpl.java
==============================================================================
---
development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/TransitionImpl.java
(original)
+++
development/laboratory/planet/components/fsm/basic/src/main/net/dpml/fsm/basic/TransitionImpl.java
Sat Jan 22 14:51:58 2005
@@ -75,6 +75,7 @@
m_endState = endState;
m_identity = identity;
m_rule = rule;
+ m_listeners = new ArrayList();
}

public TransitionRule getTransitionRule()
@@ -182,20 +183,26 @@
return false;
}

+ if( !m_rule.equals( transition.getTransitionRule() ) )
+ {
+ return false;
+ }
+
return true;
}

public int hashCode()
{
- int result;
- result = m_beginState.hashCode();
- result = ( result >>> 11 ) + m_endState.hashCode();
- result = ( result >>> 17 ) + m_identity.hashCode();
- return result;
+ int hash;
+ hash = m_beginState.hashCode();
+ hash = hash ^ m_endState.hashCode();
+ hash = hash + m_identity.hashCode();
+ hash = hash ^ m_rule.hashCode();
+ return hash;
}

public String toString()
{
- return "transition[" + m_identity +"]";
+ return "Transition[" + m_identity +"]";
}
}

Added:
development/laboratory/planet/components/fsm/basic/src/test/net/dpml/fsm/basic/test/AbstractTransitionTC.java
==============================================================================
--- (empty file)
+++
development/laboratory/planet/components/fsm/basic/src/test/net/dpml/fsm/basic/test/AbstractTransitionTC.java
Sat Jan 22 14:51:58 2005
@@ -0,0 +1,222 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * 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.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.fsm.basic.test;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
+import java.util.Collection;
+import java.util.Locale;
+
+import junit.framework.TestCase;
+
+import net.dpml.fsm.State;
+import net.dpml.fsm.StateMachine;
+import net.dpml.fsm.Transition;
+import net.dpml.fsm.TransitionEvent;
+import net.dpml.fsm.TransitionListener;
+
+import net.dpml.fsm.basic.CommandRuleImpl;
+import net.dpml.fsm.basic.StateImpl;
+import net.dpml.fsm.basic.TransitionImpl;
+
+import net.dpml.lang.NullArgumentException;
+
+public class AbstractTransitionTC extends TestCase
+{
+ protected StateImpl m_state1;
+ protected StateImpl m_state2;
+ protected StateImpl m_state3;
+ protected StateImpl m_state4;
+
+ protected Transition m_transition1;
+ protected Transition m_transition2;
+ protected Transition m_transition3;
+ protected Transition m_transition4;
+ protected Transition m_transition5;
+ protected Transition m_transition6;
+ protected Transition m_transition7;
+ protected Transition m_transition11;
+ protected Transition m_transition12;
+
+ protected CommandRuleImpl m_rule1;
+ protected CommandRuleImpl m_rule2;
+
+ public AbstractTransitionTC( String name )
+ {
+ super( name );
+ }
+
+ public void testConstructor()
+ {
+ assertEquals( "begin", m_state1, m_transition1.getBeginState() );
+ assertEquals( "end", m_state2, m_transition1.getEndState() );
+ assertEquals( "identity", "test", m_transition11.getIdentity() );
+ assertEquals( "rule", m_rule1, m_transition2.getTransitionRule() );
+ }
+
+ public void testLocale()
+ {
+ ClassLoader cl = getClass().getClassLoader();
+ Locale en = Locale.US;
+ Locale sv = new Locale( "sv" );
+
+ assertEquals( "name_en", "SomeName", m_transition11.getName( en, cl
) );
+ assertEquals( "description_en", "SomeDescription",
m_transition11.getDescription( en, cl ) );
+ assertEquals( "name_en", "SomeOtherName", m_transition12.getName(
en, cl ) );
+ assertEquals( "description_en", "Some Other Descriptription",
m_transition12.getDescription( en, cl ) );
+
+ assertEquals( "name_sv", "EttNamn", m_transition11.getName( sv, cl )
);
+ assertEquals( "description_sv", "EnBeskrivning",
m_transition11.getDescription( sv, cl ) );
+ assertEquals( "name_sv", "Ett Annat Namn", m_transition12.getName(
sv, cl ) );
+ assertEquals( "description_sv", "En annan beskrivning.",
m_transition12.getDescription( sv, cl ) );
+ }
+
+ public void testToString()
+ {
+ assertEquals( "toString", "Transition[transition1]",
m_transition1.toString() );
+ assertEquals( "toString", "Transition[test]",
m_transition11.toString() );
+ assertEquals( "toString", "Transition[test2]",
m_transition12.toString() );
+ }
+
+ public void testEquals()
+ {
+ assertEquals( "equals not true", m_transition1, m_transition2 );
+
+ assertTrue( "equals true (begin)", ! m_transition1.equals(
m_transition3 ) );
+ assertTrue( "equals true (end)", ! m_transition1.equals(
m_transition4 ) );
+ assertTrue( "equals true (identity)", ! m_transition1.equals(
m_transition5 ) );
+ assertTrue( "equals true (rule)", ! m_transition1.equals(
m_transition6 ) );
+ assertEquals( "equals true (logger)", m_transition1, m_transition7 );
+ }
+
+ public void testHashCode()
+ {
+ int hash = m_transition1.hashCode();
+ assertEquals( "hashCode not same", hash, m_transition2.hashCode() );
+
+ assertTrue( "hashCode same (begin): " + hash, hash !=
m_transition3.hashCode() );
+ assertTrue( "hashCode same (end): " + hash, hash !=
m_transition4.hashCode() );
+ assertTrue( "hashCode same (identity): " + hash, hash !=
m_transition5.hashCode() );
+ assertTrue( "hashCode same (rule): " + hash, hash !=
m_transition6.hashCode() );
+ assertTrue( "hashCode same (logger): " + hash, hash ==
m_transition7.hashCode() );
+ }
+
+ public void testEvents()
+ {
+ StateMachine sm = new TestStateMachine();
+ TransitionEvent expected = new TransitionEvent( this, m_transition1,
sm );
+ TestListener listener = new TestListener( expected );
+ m_transition1.addTransitionListener( listener );
+ m_transition1.execute( this, sm );
+ assertEquals( "Event count.", 1, listener.getCounter() );
+ m_transition1.removeTransitionListener( listener );
+ listener.noMore();
+ m_transition1.execute( this, sm );
+ assertEquals( "Event count.", 1, listener.getCounter() );
+ }
+
+ private class TestListener
+ implements TransitionListener
+ {
+ private TransitionEvent m_expected;
+ private int m_counter = 0;
+
+ TestListener( TransitionEvent expected )
+ {
+ m_expected = expected;
+ }
+
+ void noMore()
+ {
+ m_expected = null;
+ }
+
+ int getCounter()
+ {
+ return m_counter;
+ }
+
+ public void transition( TransitionEvent event )
+ {
+ m_counter++;
+ if( m_expected == null )
+ throw new RuntimeException( "unexpected event" );
+ if( ! m_expected.getTransition().equals( event.getTransition() )
)
+ error( "transition" );
+ if( ! m_expected.getStateMachine().equals(
event.getStateMachine() ) )
+ error( "statemachine" );
+ if( ! m_expected.getSource().equals( event.getSource() ) )
+ error( "source" );
+ return;
+ }
+
+ private void error( String field )
+ {
+ throw new RuntimeException( "Incorrect field in event: " + field
);
+ }
+ }
+
+ class TestStateMachine
+ implements StateMachine
+ {
+ public void trigger( Object source, String commandString )
+ {
+ }
+
+ public State getCurrentState()
+ {
+ return null;
+ }
+
+ public void addTransition( Transition transition )
+ {
+ }
+
+ public void addTransitions( Collection transitions )
+ {
+ }
+
+ public void removeTransition( Transition transition )
+ {
+ }
+
+ public void removeAllTransitions()
+ {
+ }
+
+ public void addTransitionListener( TransitionListener listener,
String transitionId )
+ {
+ }
+
+ public void removeTransitionListener( TransitionListener listener,
String transitionId )
+ {
+ }
+
+ public void removeTransitionListener( TransitionListener listener )
+ {
+ }
+
+ public void reset( State initialState )
+ {
+ }
+ }
+}

Modified:
development/laboratory/planet/components/fsm/basic/src/test/net/dpml/fsm/basic/test/StateTestCase.java
==============================================================================
---
development/laboratory/planet/components/fsm/basic/src/test/net/dpml/fsm/basic/test/StateTestCase.java
(original)
+++
development/laboratory/planet/components/fsm/basic/src/test/net/dpml/fsm/basic/test/StateTestCase.java
Sat Jan 22 14:51:58 2005
@@ -84,19 +84,8 @@
public void testLocale()
{
ClassLoader cl = getClass().getClassLoader();
-
- Locale[] all = Locale.getAvailableLocales();
- for( int i = 0; i < all.length ; i++ )
- {
- if( i != 0 )
- System.out.print( ", " );
- System.out.print( all[i] );
- }
- System.out.println();
-
Locale en = Locale.US;
Locale sv = new Locale( "sv" );
- System.out.println( sv.getDisplayName() );

StateImpl state1 = new StateImpl( "test" );
StateImpl state2 = new StateImpl( "test2" );

Added:
development/laboratory/planet/components/fsm/basic/src/test/net/dpml/fsm/basic/test/TransitionComponentTestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/planet/components/fsm/basic/src/test/net/dpml/fsm/basic/test/TransitionComponentTestCase.java
Sat Jan 22 14:51:58 2005
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * 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.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.fsm.basic.test;
+
+import java.util.HashMap;
+
+import net.dpml.context.Context;
+import net.dpml.context.ContextException;
+
+import net.dpml.fsm.State;
+import net.dpml.fsm.StateMachine;
+import net.dpml.fsm.TransitionRule;
+
+import net.dpml.fsm.basic.CommandRuleImpl;
+import net.dpml.fsm.basic.StateImpl;
+import net.dpml.fsm.basic.TransitionComponent;
+
+import net.dpml.logging.Logger;
+import net.dpml.logging.provider.ConsoleLogger;
+
+import net.dpml.service.ServiceManager;
+import net.dpml.service.ServiceException;
+
+import net.dpml.parameters.impl.DefaultParameters;
+
+
+public class TransitionComponentTestCase extends AbstractTransitionTC
+{
+ public void setUp()
+ throws Exception
+ {
+ Logger logger = new ConsoleLogger();
+ m_rule1 = new CommandRuleImpl( "next", 100, false );
+ m_rule2 = new CommandRuleImpl( "prev", 101, false );
+ StateMachine fsm = new TestStateMachine();
+
+ m_state1 = new StateImpl( "state1" );
+ m_state2 = new StateImpl( "state2" );
+ m_state3 = new StateImpl( "state3" );
+ m_state4 = new StateImpl( "state4" );
+
+ Context ctx1 = new TestContext( "transition1" );
+ Context ctx2 = new TestContext( "transition2" );
+ Context ctx3 = new TestContext( "test" );
+ Context ctx4 = new TestContext( "test2" );
+
+ TestServiceManager man1 = new TestServiceManager( m_state1,
m_state2, fsm, m_rule1 );
+ TestServiceManager man2 = new TestServiceManager( m_state2,
m_state2, fsm, m_rule1 );
+ TestServiceManager man3 = new TestServiceManager( m_state1,
m_state3, fsm, m_rule1 );
+ TestServiceManager man4 = new TestServiceManager( m_state1,
m_state2, fsm, m_rule2 );
+
+ m_transition1 = new TransitionComponent( man1, ctx1, logger );
+ m_transition2 = new TransitionComponent( man1, ctx1, logger );
+
+ m_transition3 = new TransitionComponent( man2, ctx1, logger );
+ m_transition4 = new TransitionComponent( man3, ctx1, logger );
+ m_transition5 = new TransitionComponent( man1, ctx2, logger );
+ m_transition6 = new TransitionComponent( man4, ctx1, logger );
+ m_transition7 = new TransitionComponent( man1, ctx1, null );
+ m_transition11 = new TransitionComponent( man1, ctx3, logger );
+ m_transition12 = new TransitionComponent( man1, ctx4, logger );
+/*
+ m_transition1 = new TransitionImpl( m_state1, m_state2,
"transition1", m_rule1, logger );
+ m_transition2 = new TransitionImpl( m_state1, m_state2,
"transition1", m_rule1, logger );
+
+ m_transition3 = new TransitionImpl( m_state2, m_state2,
"transition1", m_rule1, logger );
+ m_transition4 = new TransitionImpl( m_state1, m_state3,
"transition1", m_rule1, logger );
+ m_transition5 = new TransitionImpl( m_state1, m_state2,
"transition2", m_rule1, logger );
+ m_transition6 = new TransitionImpl( m_state1, m_state2,
"transition1", m_rule2, logger );
+ m_transition7 = new TransitionImpl( m_state1, m_state2,
"transition1", m_rule1, null );
+
+ m_transition11 = new TransitionImpl( m_state1, m_state2, "test",
m_rule1, logger );
+ m_transition12 = new TransitionImpl( m_state1, m_state2, "test2",
m_rule1, logger );
+*/
+ }
+
+ public TransitionComponentTestCase( String name )
+ {
+ super( name );
+ }
+
+ private class TestServiceManager
+ implements ServiceManager
+ {
+ private HashMap m_services;
+
+ TestServiceManager( State begin, State end, StateMachine fsm,
TransitionRule rule )
+ {
+ m_services = new HashMap();
+ m_services.put( "begin", begin );
+ m_services.put( "end", end );
+ m_services.put( "fsm", fsm );
+ m_services.put( "rule", rule );
+ }
+
+ public Object lookup( String key )
+ throws ServiceException
+ {
+ Object obj = m_services.get( key );
+ if( obj == null )
+ throw new ServiceException( key, "service not found" );
+ return obj;
+ }
+
+ public boolean hasService( String key )
+ {
+ Object obj = m_services.get( key );
+ if( obj == null )
+ return false;
+ return true;
+ }
+
+ public void release( Object obj )
+ {
+ }
+ }
+
+ private class TestContext
+ implements Context
+ {
+ private String m_name;
+
+ TestContext( String name )
+ {
+ m_name = name;
+ }
+
+ public Object get( Object key )
+ throws ContextException
+ {
+ if( key.equals( "urn:metro:name" ) )
+ return m_name;
+ throw new ContextException( "Context entry not found: '" + key +
"'" );
+ }
+ }
+}

Added:
development/laboratory/planet/components/fsm/basic/src/test/net/dpml/fsm/basic/test/TransitionImplTestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/planet/components/fsm/basic/src/test/net/dpml/fsm/basic/test/TransitionImplTestCase.java
Sat Jan 22 14:51:58 2005
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * 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.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.fsm.basic.test;
+
+import net.dpml.fsm.basic.CommandRuleImpl;
+import net.dpml.fsm.basic.StateImpl;
+import net.dpml.fsm.basic.TransitionImpl;
+
+import net.dpml.logging.Logger;
+import net.dpml.logging.provider.ConsoleLogger;
+
+public class TransitionImplTestCase extends AbstractTransitionTC
+{
+ public void setUp()
+ {
+ Logger logger = new ConsoleLogger();
+ m_rule1 = new CommandRuleImpl( "next", 100, false );
+ m_rule2 = new CommandRuleImpl( "prev", 101, false );
+
+ m_state1 = new StateImpl( "state1" );
+ m_state2 = new StateImpl( "state2" );
+ m_state3 = new StateImpl( "state3" );
+ m_state4 = new StateImpl( "state4" );
+
+ m_transition1 = new TransitionImpl( m_state1, m_state2,
"transition1", m_rule1, logger );
+ m_transition2 = new TransitionImpl( m_state1, m_state2,
"transition1", m_rule1, logger );
+
+ m_transition3 = new TransitionImpl( m_state2, m_state2,
"transition1", m_rule1, logger );
+ m_transition4 = new TransitionImpl( m_state1, m_state3,
"transition1", m_rule1, logger );
+ m_transition5 = new TransitionImpl( m_state1, m_state2,
"transition2", m_rule1, logger );
+ m_transition6 = new TransitionImpl( m_state1, m_state2,
"transition1", m_rule2, logger );
+ m_transition7 = new TransitionImpl( m_state1, m_state2,
"transition1", m_rule1, null );
+
+ m_transition11 = new TransitionImpl( m_state1, m_state2, "test",
m_rule1, logger );
+ m_transition12 = new TransitionImpl( m_state1, m_state2, "test2",
m_rule1, logger );
+
+ }
+
+ public TransitionImplTestCase( String name )
+ {
+ super( name );
+ }
+
+}

Modified: development/laboratory/planet/components/fsm/index.xml
==============================================================================
--- development/laboratory/planet/components/fsm/index.xml (original)
+++ development/laboratory/planet/components/fsm/index.xml Sat Jan 22
14:51:58 2005
@@ -64,6 +64,7 @@
<include key="dpml-activity-api" />
<include key="dpml-context-api" />
<include key="dpml-logging-api" />
+ <include key="dpml-logging-spi" build="false" runtime="false"
test="true" />
<include key="dpml-parameters-api" />
<include key="dpml-parameters-impl" build="false" runtime="false"
test="true" />
<include key="dpml-service-api" />



  • svn commit: r1557 - in development/laboratory/planet/components/fsm: . api/src/main/net/dpml/fsm basic/src/main/net/dpml/fsm/basic basic/src/test/net/dpml/fsm/basic/test, niclas, 01/22/2005

Archive powered by MHonArc 2.6.24.

Top of Page