Package nexj.core.integration.io

Examples of nexj.core.integration.io.StringInput


    * last field, and also if file ends without a newline.
    */
   public void testParseSimpleTableWithQuotedLastField() throws Exception
   {
      TransferObject record;
      TransferObject root = m_parser.parse(new StringInput(
         "Doe,\u001eJohn\u001e\r" +
         "Zhang,Hui Mei,37,2007-07-27 05:24:00.000000000\r" +
         "\u001eLin\u001e"
         ), m_noheader_message);
     
View Full Code Here


    * Unexpected EOF: End of File inside a quoted field.
    */
   public void testParseSimpleTableWithEofBeforeCloseQuote() throws Exception
   {
      TransferObject record;
      TransferObject root = m_parser.parse(new StringInput(
         "Doe,\u001eJohn\u001e\r" +
         "Zhang,Hui Mei,37,2007-07-27 05:24:00.000000000\r" +
         "\u001eLin"
         ), m_noheader_message);
     
View Full Code Here

    * Unexpected EOF: Immediately after an open quote.
    */
   public void testParseSimpleTableWithEofAfterOpenQuote() throws Exception
   {
      TransferObject record;
      TransferObject root = m_parser.parse(new StringInput(
         "Doe,\u001eJohn\u001e\r" +
         "Zhang,\u001e"
         ), m_noheader_message);
     
     
View Full Code Here

    * Unexpected EOF: Immediately after a close quote.
    */
   public void testParseSimpleTableWithEofAfterCloseQuote() throws Exception
   {
      TransferObject record;
      TransferObject root = m_parser.parse(new StringInput(
         "Doe,\u001eJohn\u001e\r" +
         "Zhang,\u001eSarah\u001e"
         ), m_noheader_message);
     
     
View Full Code Here

    * Unexpected EOF: Immediately after an escape character.
    */
   public void testParseSimpleTableWithEofAfterEscape() throws Exception
   {
      TransferObject record;
      TransferObject root = m_parser.parse(new StringInput(
         "Doe,\u001eJohn\u001e\r" +
         "Zhang,Hui Mei\\"
         ), m_noheader_message);
     
     
View Full Code Here

    * Unexpected EOF: Inside quotes, immediately after an escape character.
    */
   public void testParseSimpleTableWithEofAfterEscapeInQuotes() throws Exception
   {
      TransferObject record;
      TransferObject root = m_parser.parse(new StringInput(
         "Doe,\u001eJohn\u001e\r" +
         "Zhang,\u001eHui Mei\\"
         ), m_noheader_message);
     
     
View Full Code Here

    * Verify that the correct exception is thrown when a required
    * field is missing in the input.
    */
   public void testMissingRequiredField() throws Exception
   {
      StringInput input = new StringInput(
         "a1,a2,a3,a4,a5,a6\r" +
         "b1,b2,b3,b4,b5\r" +
         "c1,c2,c3,c4\r"
         );
     
View Full Code Here

    * other columns are unmapped. All columns are optional.
    */
   public void testParseSkippedColumns() throws Exception
   {
      TransferObject record;
      TransferObject root = m_parser.parse(new StringInput(
         "Doe,,,,John\n" +
         "Doe,,,,Jane\n" +
         "Lin,,,\n"
         ), m_skippedcolumns_message);
     
View Full Code Here

    * other columns are unmapped. All columns are optional.
    */
   public void testParseSkippedOptionalBeginning() throws Exception
   {
      TransferObject record;
      TransferObject root = m_parser.parse(new StringInput(
         "a1,a2,realdata1,a4,a5,realdata2\n" +
         ",,nextrealdata1,,,nextrealdata2\n" +
         "c1,c2\n"+
         ",\n"
         ), m_skippedOptionalBeginning_message);
View Full Code Here

    * This Message has data in the third and sixth columns, and the
    * other columns are unmapped. All columns are required.
    */
   public void testParseSkippedRequiredBeginning1() throws Exception
   {
      StringInput input = new StringInput(
         "a1,a2,realdata1,a4,a5,realdata2\n" +
         ",,nextrealdata1,,,nextrealdata2\n" +
         "c1,c2\n"
         );
     
View Full Code Here

TOP

Related Classes of nexj.core.integration.io.StringInput

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.