| /** |
| ******************************************************************************** |
| * Copyright (c) 2019 Dortmund University of Applied Sciences and Arts and others. |
| * |
| * This program and the accompanying materials are made |
| * available under the terms of the Eclipse Public License 2.0 |
| * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Dortmund University of Applied Sciences and Arts - initial API and implementation |
| ******************************************************************************** |
| */ |
| |
| package org.eclipse.app4mc.multicore.execution.logic.executionmodel.test; |
| |
| import org.junit.Test; |
| |
| public class TaskFSMTest { |
| @Test |
| public void test() { |
| // EMTaskFSM fsm = new EMTaskFSM(EMTaskState.READY); |
| // assertEquals(fsm.getState(), EMTaskState.READY); |
| // assertFalse(fsm.dispatchEvent(EMTaskEvent.WAIT)); |
| // assertEquals(fsm.getState(), EMTaskState.READY); |
| // assertTrue(fsm.dispatchEvent(EMTaskEvent.START)); |
| // assertEquals(fsm.getState(), EMTaskState.RUNNING); |
| // |
| // fsm.dispatchEvent(EMTaskEvent.TERMINATE); |
| // fsm.dispatchEvent(EMTaskEvent.ACTIVATE); |
| // fsm.dispatchEvent(EMTaskEvent.START); |
| // fsm.dispatchEvent(EMTaskEvent.WAIT); |
| // fsm.dispatchEvent(EMTaskEvent.RELEASE); |
| // fsm.dispatchEvent(EMTaskEvent.START); |
| // assertEquals(fsm.getState(), EMTaskState.RUNNING); |
| } |
| |
| } |