Package test.propagation.impl

Source Code of test.propagation.impl.StateItemImplTest

package test.propagation.impl;

import junit.framework.TestCase;
import propagation.StateItem;
import propagation.impl.StateItemImpl;

public class StateItemImplTest extends TestCase {
   private StateItem stateItem_;

   protected void setUp() throws Exception {
      stateItem_ = new StateItemImpl(1234);
   }

   protected void tearDown() throws Exception {
      super.tearDown();
   }

   public void testGetState() {
      stateItem_.setState(1030);
      assertEquals(1030, stateItem_.getState());
   }

   public void testSetState() {
      stateItem_.setState(1040);
      assertEquals(StateItem.STATE_NOT_CHANGED, stateItem_.setState(1040));
      assertEquals(StateItem.STATE_CHANGED, stateItem_.setState(1041));
   }

   public void testGetItemId() {
      assertEquals(1234, stateItem_.getItemId());
   }
}
TOP

Related Classes of test.propagation.impl.StateItemImplTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.