Examples of FSM


Examples of eas.math.fundamentalAlgorithms.graphBased.algorithms.fsm.FSM

    @Override
    public void runBeforeSimulation(DummyEnvironment umg,
            ParCollection params) {
        super.runBeforeSimulation(umg, params);
        LinkedList<RepresentableAsGraph> list = new LinkedList<RepresentableAsGraph>();
        list.add(new FSM());
        list.add(new PDA());
        list.add(new Turing());
        list.add(new Grammar());
        list.add(new BDD());
        list.add(new Huffman());
View Full Code Here

Examples of eas.math.fundamentalAlgorithms.graphBased.algorithms.fsm.FSM

     * diesen zurück.
     *
     * @return  Der neue Automat.
     */
    public FSM execute() {
        FSM aut = new FSM();
        int z = 0;
       
        for (FSMScriptInstruction i : program) {
            if (z == 0) {
                aut.setInitialState(i.getFirstState());
            }
            i.execute(aut);
            z++;
        }
       
View Full Code Here

Examples of nz.ac.waikato.modeljunit.examples.FSM

    return new TestSuite(ModelTest.class);
  }

  public static void testReflection()
  {
    FSM sut = new FSM();
    Model model = new Model(sut);
    assertEquals(sut, model.getModel());
    assertEquals(FSM.class, model.getModelClass());
    assertEquals("nz.ac.waikato.modeljunit.examples.FSM",
        model.getModelName());
View Full Code Here

Examples of nz.ac.waikato.modeljunit.examples.FSM

  }


  public static void testFlag()
  {
    FSM sut = new FSM();
    Model model = new Model(sut);
    assertTrue(model.getTesting());
    assertTrue(model.setTesting(false));
    assertFalse(model.getTesting());
    assertFalse(model.setTesting(true));
View Full Code Here

Examples of nz.ac.waikato.modeljunit.examples.FSM

    assertTrue(model.getTesting());
  }

  public static void testOutput()
  {
    FSM sut = new FSM();
    Model model = new Model(sut);
    Writer wr0 = model.getOutput();
    assertTrue(wr0 instanceof OutputStreamWriter);
    Writer wr1 = new StringWriter();
    assertEquals(wr0, model.setOutput(wr1));
View Full Code Here

Examples of nz.ac.waikato.modeljunit.examples.FSM

    assertEquals("test\nWarning: warning\n", wr1.toString());
  }

  public static void testEnabled()
  {
    Model model = new Model(new FSM());
    int action0 = model.getActionNumber("action0");
    int action1 = model.getActionNumber("action1");
    int action2 = model.getActionNumber("action2");
    int actionNone = model.getActionNumber("actionNone");
    Object s0 = model.getCurrentState();
View Full Code Here

Examples of nz.ac.waikato.modeljunit.examples.FSM

    }
  }

  public void testListener()
  {
    Model model = new Model(new FSM());
    ModelListener dummy = new AbstractListener()
      {
        public String getName() {return "dummy";}
        @Override public void doneReset(String reason, boolean testing)
        {
View Full Code Here

Examples of nz.ac.waikato.modeljunit.examples.FSM

public class SimpleMBTTest
{
  @Test 
  public void testMBTTest() {
  SimpleMBT tester = new SimpleMBT(new FSM());
  try {
    String action = tester.generate();
    assertTrue(action.startsWith("action") || action.startsWith("reset"));
  } catch (Exception e) {
    e.printStackTrace();
View Full Code Here

Examples of nz.ac.waikato.modeljunit.examples.FSM

  {
    return new TestSuite(ModelTestCaseTest.class);
  }

  public static void testProperties() {
    FSM fsm = new FSM();
    ModelTestCase model = new ModelTestCase(fsm);
    model.allRoundTrips(100);
    model.randomWalk(4);
    model.setVerbosity(3);
    model.setResetProbability(0.1);
View Full Code Here

Examples of nz.ac.waikato.modeljunit.examples.FSM

   
   
  }
 
  public static void testSetInvalidResetProbablility() {
    ModelTestCase model = new ModelTestCase(new FSM());
    try {
      model.setResetProbability(2);
    } catch (IllegalArgumentException e) {
      Assert.assertEquals("illegal reset probability: 2.0", e.getMessage());
   
View Full Code Here
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.