Package statechum.analysis.learning.observers.ProgressDecorator

Examples of statechum.analysis.learning.observers.ProgressDecorator.InitialData


  @Test
  public final void testLoadInit_fail4()
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,Configuration.getDefaultConfiguration(),false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    Element negativeToRemove = (Element)initElement.getElementsByTagName(ELEM_KINDS.ELEM_SEQ.name()).item(1);// the second one
    initElement.removeChild(negativeToRemove);
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();
View Full Code Here


  @Test
  public final void testLoadInit_fail5()
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,Configuration.getDefaultConfiguration(),false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    initElement.appendChild(dumper.writeSequenceList(ELEM_KINDS.ATTR_NEGATIVE_SEQUENCES.name(), justSomething));
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false);
View Full Code Here

  @Test
  public final void testLoadInit_fail6()
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,Configuration.getDefaultConfiguration(),false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    Element graphToRemove = (Element)initElement.getElementsByTagName(Transform322.graphmlNodeName).item(0);
    initElement.removeChild(graphToRemove);
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();
   
View Full Code Here

  @Test
  public final void testLoadInit_fail7()
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,Configuration.getDefaultConfiguration(),false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    initElement.appendChild(new LearnerGraph(TestFSMAlgo.buildGraph("A-a->A", "testLoadInit_fail7"),Configuration.getDefaultConfiguration())
      .transform322.createGraphMLNode(dumper.doc));
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();
View Full Code Here

  @Test
  public final void testLoadInit_fail12()
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,Configuration.getDefaultConfiguration(),false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    initElement.appendChild(dumper.doc.createElement("junk"));
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false);
View Full Code Here

  @Test
  public final void testLoadInit_fail13()
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,Configuration.getDefaultConfiguration(),false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    Element testSequences = (Element)initElement.getElementsByTagName(ELEM_KINDS.ELEM_SEQ.name()).item(0);
    testSequences.removeAttribute(ELEM_KINDS.ATTR_SEQ.name());testSequences.setAttribute(ELEM_KINDS.ATTR_SEQ.name(), "junk");
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();
View Full Code Here

        new String[]{"5"}
    });

    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,Configuration.getDefaultConfiguration(),false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();
  }
View Full Code Here

  }

  @Test
  public final void createInitialData()
  {
    InitialData data = new InitialData(plus,5,minus,4,graph);
    Assert.assertEquals(5,data.plusSize);Assert.assertEquals(4, data.minusSize);
    Assert.assertSame(plus,data.plus);Assert.assertSame(minus,data.minus);Assert.assertSame(graph,data.graph);
  }
View Full Code Here

 
  @Test
  public final void createInitialData_fail1()
  {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      new InitialData(new LinkedList<List<String>>(),-1,new LinkedList<List<String>>(),0,null);
    }},IllegalArgumentException.class,"inconsistent positive");
  }
View Full Code Here

 
  @Test
  public final void createInitialData_fail2()
  {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      new InitialData(new LinkedList<List<String>>(),0,new LinkedList<List<String>>(),5,null);
    }},IllegalArgumentException.class,"inconsistent negative");
  }
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.observers.ProgressDecorator.InitialData

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.