Package statechum.model.testset

Examples of statechum.model.testset.PrefixFreeCollection


   */
  @Test
  public final void testAppendSequence0()
  {
    LearnerGraph fsm = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence0"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{}
      });
   
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{}));
    Set<List<String>> actual = new HashSet<List<String>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here


   */
  @Test
  public final void testAppendSequence0b()
  {
    LearnerGraph fsm = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence0b"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(Arrays.asList(new String[]{}));

    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{}
      });
   
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{}));
    Set<List<String>> actual = new HashSet<List<String>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   */
  @Test
  public final void testAppendSequence1()
  {
    LearnerGraph fsm = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence1"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(Arrays.asList(new String[]{"p","b"}));
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{"p","b"}
      });
   
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{}));
    Set<List<String>> actual = new HashSet<List<String>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   */
  @Test
  public final void testAppendSequence2()
  {
    LearnerGraph fsm = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence2"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(Arrays.asList(new String[]{"p","b"}));
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{"p","b"}
      });
   
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{"p","b"}));
    Set<List<String>> actual = new HashSet<List<String>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   */
  @Test
  public final void testAppendSequence3()
  {
    LearnerGraph fsm = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence3"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(Arrays.asList(new String[]{"p","b"}));
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{"p","b","c"}
      });
   
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{"p","b","c"}));
    Set<List<String>> actual = new HashSet<List<String>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   */
  @Test
  public final void testAppendSequence4()
  {
    LearnerGraph fsm = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence4"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(Arrays.asList(new String[]{"p","b"}));
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{"p","b"},
        new String[]{"p","p"}
      });
   
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{"p","p"}));
    Set<List<String>> actual = new HashSet<List<String>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   */
  @Test
  public final void testAppendSequence5()
  {
    LearnerGraph fsm = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence5"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(Arrays.asList(new String[]{"p","b"}));
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{"p","b"},
        new String[]{"p","p","p"}
      });
   
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{"p"}));
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{"p","p"}));
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{"p","p","p"}));
    Set<List<String>> actual = new HashSet<List<String>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   * Test method for {@link statechum.analysis.learning.rpnicore.WMethod#appendAllSequences(statechum.analysis.learning.TestFSMAlgo.FSMStructure, java.util.Set, java.util.Set)}.
   */
  @Test
  public final void testAppendAllSequences0() {
    LearnerGraph fsm = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendAllSequences0"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{"p","p","p"},
        new String[]{"g"}
      });
   
    fsm.wmethod.appendAllSequences(sequences, buildList(new String[][] {
        new String[]{"p"},new String[]{"p","p"},new String[] {}, new String [] {"g"},new String[]{"p","p","p"}}));
    Set<List<String>> actual = new HashSet<List<String>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   * Test method for {@link statechum.analysis.learning.rpnicore.WMethod#appendAllSequences(statechum.analysis.learning.TestFSMAlgo.FSMStructure, java.util.Set, java.util.Set)}.
   */
  @Test
  public final void testAppendAllSequences0b() {
    LearnerGraph fsm = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendAllSequences0b"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    Set<List<String>> expected = buildSet(new String[][]{
      });
   
    fsm.wmethod.appendAllSequences(sequences, buildList(new String[][] {}));
    Set<List<String>> actual = new HashSet<List<String>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   * Test method for {@link statechum.analysis.learning.rpnicore.WMethod#appendAllSequences(statechum.analysis.learning.TestFSMAlgo.FSMStructure, java.util.Set, java.util.Set)}.
   */
  @Test
  public final void testAppendAllSequences1() {
    LearnerGraph fsm = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendAllSequences1"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(Arrays.asList(new String[]{"p","b"}));
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{"p","b"},
        new String[]{"g"},
        new String[]{"p","p","p"}
      });
   
    fsm.wmethod.appendAllSequences(sequences, buildList(new String[][] {
        new String[]{"p"},new String[]{"p","p"},new String[] {}, new String [] {"g"},new String[]{"p","p","p"}}));
    Set<List<String>> actual = new HashSet<List<String>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

TOP

Related Classes of statechum.model.testset.PrefixFreeCollection

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.