Package statechum.analysis.learning.Visualiser

Examples of statechum.analysis.learning.Visualiser.LayoutOptions


                            {
                              Configuration config = Configuration.getDefaultConfiguration().copy();
                              LearnerGraphND machine = new LearnerGraphND(config);Synapse.StatechumProcess.parseStatemachine(message.elementAt(2),machine,null,true);
                              DirectedSparseGraph fsmPicture = machine.pathroutines.getGraph();
                              if (!fsmPicture.containsUserDatumKey(JUConstants.LAYOUTOPTIONS))
                                fsmPicture.addUserDatum(JUConstants.LAYOUTOPTIONS,new LayoutOptions(), UserData.SHARED);
                              int windowNumber = setOptions(message,3,fsmPicture);
                              if (windowNumber >= 0)
                                Visualiser.updateFrameWithPos(fsmPicture,windowNumber);

                              outcome = new OtpErlangTuple(new OtpErlangObject[]{ref,msgOk});
View Full Code Here


  }

  @Test
  public void testLayoutOptions1()
  {
    final LayoutOptions options = new LayoutOptions();
   
    checkForCorrectException(new whatToRun() { public @Override void run() {
      Synapse.StatechumProcess.setStateNamesToBeIgnored(options, new OtpErlangTuple(new OtpErlangObject[0]));
    }},ClassCastException.class,"OtpErlangTuple");// when we do not collect output, no response is sent.
   
View Full Code Here

  }
 
  @Test
  public void testLayoutOptions2()
  {
    final LayoutOptions options = new LayoutOptions();
   
    checkForCorrectException(new whatToRun() { public @Override void run() {
      Synapse.StatechumProcess.setStateNamesToBeIgnored(options, new OtpErlangList(new OtpErlangObject[]{new OtpErlangString("a")}));
    }},ClassCastException.class,"OtpErlangString");// when we do not collect output, no response is sent.
   
View Full Code Here

  }

  @Test
  public void testLayoutOptions3()
  {
    final LayoutOptions options = new LayoutOptions();
   
    Assert.assertNull(options.ignoredStates);
    Synapse.StatechumProcess.setStateNamesToBeIgnored(options, new OtpErlangList(new OtpErlangObject[0]));
    Assert.assertNull(options.ignoredStates);
  }
View Full Code Here

  }

  @Test
  public void testLayoutOptions4()
  {
    final LayoutOptions options = new LayoutOptions();
   
    Assert.assertNull(options.ignoredStates);
    Synapse.StatechumProcess.setStateNamesToBeIgnored(options, new OtpErlangList(new OtpErlangObject[]{new OtpErlangAtom("a")}));
    Assert.assertNotNull(options.ignoredStates);
    Assert.assertEquals(1,options.ignoredStates.size());Assert.assertEquals("a",options.ignoredStates.iterator().next());
View Full Code Here


  @Test
  public void testLayoutOptions5()
  {
    final LayoutOptions options = new LayoutOptions();
   
    Assert.assertNull(options.ignoredStates);
    Synapse.StatechumProcess.setStateNamesToBeIgnored(options, new OtpErlangList(new OtpErlangObject[]{new OtpErlangAtom("b"),new OtpErlangAtom("a")}));
    Assert.assertNotNull(options.ignoredStates);
    Assert.assertEquals(2,options.ignoredStates.size());
View Full Code Here

 
  /** Tests the copying process for ignored states. */
  @Test
  public void testLayoutOptions6()
  {
    final LayoutOptions options = new LayoutOptions();
   
    Assert.assertNull(options.ignoredStates);
    Synapse.StatechumProcess.setStateNamesToBeIgnored(options, new OtpErlangList(new OtpErlangObject[]{new OtpErlangAtom("b"),new OtpErlangAtom("a")}));
    Assert.assertNotNull(options.ignoredStates);
    Assert.assertEquals(2,options.ignoredStates.size());
    Iterator<String> ignoreIterator = options.ignoredStates.iterator();
    Assert.assertEquals("b",ignoreIterator.next());Assert.assertEquals("a",ignoreIterator.next());
   
    LayoutOptions copy = options.copy();
    Synapse.StatechumProcess.setStateNamesToBeIgnored(options, new OtpErlangList(new OtpErlangObject[]{new OtpErlangAtom("c")}));
    Assert.assertNotNull(options.ignoredStates);
    Assert.assertEquals(3,options.ignoredStates.size());
    ignoreIterator = options.ignoredStates.iterator();
    Assert.assertEquals("b",ignoreIterator.next());Assert.assertEquals("c",ignoreIterator.next());Assert.assertEquals("a",ignoreIterator.next());
View Full Code Here

                            {
                              Configuration config = Configuration.getDefaultConfiguration().copy();
                              LearnerGraphND machine = new LearnerGraphND(config);Synapse.StatechumProcess.parseStatemachine(message.elementAt(2),machine,null,true);
                              DirectedSparseGraph fsmPicture = machine.pathroutines.getGraph();
                              if (!fsmPicture.containsUserDatumKey(JUConstants.LAYOUTOPTIONS))
                                fsmPicture.addUserDatum(JUConstants.LAYOUTOPTIONS,new LayoutOptions(), UserData.SHARED);
                              int windowNumber = setOptions(message,3,fsmPicture);
                              if (windowNumber >= 0)
                                Visualiser.updateFrameWithPos(fsmPicture,windowNumber);

                              outcome = new OtpErlangTuple(new OtpErlangObject[]{ref,msgOk});
View Full Code Here

  }

  @Test
  public void testLayoutOptions1()
  {
    final LayoutOptions options = new LayoutOptions();
   
    checkForCorrectException(new whatToRun() { public @Override void run() {
      Synapse.StatechumProcess.setStateNamesToBeIgnored(options, new OtpErlangTuple(new OtpErlangObject[0]));
    }},ClassCastException.class,"OtpErlangTuple");// when we do not collect output, no response is sent.
   
View Full Code Here

  }
 
  @Test
  public void testLayoutOptions2()
  {
    final LayoutOptions options = new LayoutOptions();
   
    checkForCorrectException(new whatToRun() { public @Override void run() {
      Synapse.StatechumProcess.setStateNamesToBeIgnored(options, new OtpErlangList(new OtpErlangObject[]{new OtpErlangString("a")}));
    }},ClassCastException.class,"OtpErlangString");// when we do not collect output, no response is sent.
   
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.Visualiser.LayoutOptions

Copyright © 2018 www.massapicom. 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.