Package statechum.StatechumXML

Examples of statechum.StatechumXML.StringSequenceWriter


    List<String> expected = Arrays.asList(new String[] {"this is a test","some more"});
    List<String> actual = new LEGACY_StringSequenceWriter(null).readInputSequence(
        LEGACY_StringSequenceWriter.seqStart+"this is a test"+LEGACY_StringSequenceWriter.seqSep+"some more"+LEGACY_StringSequenceWriter.seqEnd);
    Assert.assertTrue("wrong result: "+actual,expected.equals(actual));
   
    actual = new StringSequenceWriter(null).readInputSequence(
        "[\"this is a test\",\"some more\"]");
    Assert.assertTrue("wrong result: "+actual,expected.equals(actual));
  }
View Full Code Here


        LEGACY_StringSequenceWriter.seqSep+"some more"+
        LEGACY_StringSequenceWriter.seqSep+"data"+
        LEGACY_StringSequenceWriter.seqEnd);
    Assert.assertTrue("wrong result: "+actual,expected.equals(actual));
   
    actual = new StringSequenceWriter(null).readInputSequence(
        "[\"this is a test\","+
        "\"some more\","+
        "\"data\""+
        "]");
    Assert.assertTrue("wrong result: "+actual,expected.equals(actual));
View Full Code Here

  }
 
  @Test
  public final void testReadInputSequence5() {
    List<String> expected = Arrays.asList(new String[] {"this is a test","some more","data"});
    List<String> actual = new StringSequenceWriter(null).readInputSequence(
        "[\"this is a test\",\n"+
        "\"some more\","+
        "\"data\""+
        "]");
    Assert.assertTrue("wrong result: "+actual,expected.equals(actual));
View Full Code Here

  }
 
  @Test
  public final void testReadInputSequence_fail2a2() {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      new StringSequenceWriter(null).readInputSequence(
          "[this is a test,"+
          "some more,"+
          "data"+
          "]");
    }},IllegalArgumentException.class,"invalid token");
View Full Code Here

  }

  @Test
  public final void testReadInputSequence_fail2b2() {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      new StringSequenceWriter(null).readInputSequence("]"+
          "[\"this is a test\","+
          "\"some more\","+
          "\"data\""+
          "]");
    }},IllegalArgumentException.class,"invalid token");
View Full Code Here

  }

  @Test
  public final void testReadInputSequence_fail3b() {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      new StringSequenceWriter(null).readInputSequence(
          "[\"this is a test\","+
          "\"some more\","+
          "\"data\"");
    }},IllegalArgumentException.class,"unexpected end of list");
  }
View Full Code Here

  }

  @Test
  public final void testReadInputSequence_fail4b() {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      new StringSequenceWriter(null).readInputSequence(
          "[\"this is a test\","+
          "\"some more\",,"+
          "\"data\""+
          "]");
    }},IllegalArgumentException.class,"unexpected comma");
View Full Code Here

  }

  @Test
  public final void testReadInputSequence_fail5b() {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      new StringSequenceWriter(null).readInputSequence(
          "[,\"this is a test\","+
          "\"some more\","+
          "\"data\""+
          "]");
    }},IllegalArgumentException.class,"unexpected comma");
View Full Code Here

  /** Embedded list.*/
  @Test
  public final void testReadInputSequence_fail6() {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      new StringSequenceWriter(null).readInputSequence(
          "[\"this is a test\",[],"+
          "\"some more\","+
          "\"data\""+
          "]");
    }},IllegalArgumentException.class,"expected a string, got []");
View Full Code Here

  /** Embedded tuple.*/
  @Test
  public final void testReadInputSequence_fail7() {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      new StringSequenceWriter(null).readInputSequence(
          "[\"this is a test\",{},"+
          "\"some more\","+
          "\"data\""+
          "]");
    }},IllegalArgumentException.class,"expected a string, got {}");
View Full Code Here

TOP

Related Classes of statechum.StatechumXML.StringSequenceWriter

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.