Examples of DdlTokenStream


Examples of org.jboss.dna.sequencer.ddl.DdlTokenStream

    public void beforeEach() {
      parser = new DataTypeParser();
    }
   
    private DdlTokenStream getTokens(String content) {
      DdlTokenStream tokens = new DdlTokenStream(content, DdlTokenStream.ddlTokenizer(false), false);
     
      tokens.start();
     
      return tokens;
    }
View Full Code Here

Examples of org.jboss.dna.sequencer.ddl.DdlTokenStream

   
    @Test
    public void shouldParseBracketedInteger() {
      printTest("shouldParseBracketedInteger()");
    String content = "(255)";
    DdlTokenStream tokens = getTokens(content);
    int value = parser.parseBracketedInteger(tokens, new DataType());
   
    Assert.assertEquals("DataType length is not correct", 255, value);
    }
View Full Code Here

Examples of org.jboss.dna.sequencer.ddl.DdlTokenStream

   
    @Test
    public void shouldParseKMGInteger() {
      printTest("shouldParseKMGInteger()");
    String content = "1000M";
    DdlTokenStream tokens = getTokens(content);
   
    int value = parser.parseInteger(tokens, new DataType());
    Assert.assertEquals("DataType length is not correct", 1000, value);
   
    content = "1000G";
View Full Code Here

Examples of org.jboss.dna.sequencer.ddl.DdlTokenStream

  public void shouldParseCHAR() {
    printTest("shouldParseCHAR()");
    String typeString = getDataTypeString(DataTypes.DTYPE_CHAR);
    String content = typeString;
   
    DdlTokenStream tokens = getTokens(content);
     
    DataType dType = parser.parse(tokens);
   
    Assert.assertNotNull("DataType was NOT found for Type = " + typeString, dType);
    Assert.assertEquals("Wrong DataType found", typeString, dType.getName());
View Full Code Here

Examples of org.jboss.dna.sequencer.ddl.DdlTokenStream

  public void shouldParseCHARACTER() {
    printTest("shouldParseCHARACTER()");
    String typeString = getDataTypeString(DataTypes.DTYPE_CHARACTER);
    String content = typeString;
   
    DdlTokenStream tokens = getTokens(content);
     
    DataType dType = parser.parse(tokens);
   
    Assert.assertNotNull("DataType was NOT found for Type = " + typeString, dType);
    Assert.assertEquals("Wrong DataType found", typeString, dType.getName());
View Full Code Here

Examples of org.jboss.dna.sequencer.ddl.DdlTokenStream

  public void shouldParseCHAR_VARYING() {
    printTest("shouldParseCHAR_VARYING()");
    String typeString = getDataTypeString(DataTypes.DTYPE_CHAR_VARYING);
    String content = typeString + " (255)";
   
    DdlTokenStream tokens = getTokens(content);
     
    DataType dType = parser.parse(tokens);
   
    Assert.assertNotNull("DataType was NOT found for Type = " + typeString, dType);
    Assert.assertEquals("Wrong DataType found", typeString, dType.getName());
View Full Code Here

Examples of org.jboss.dna.sequencer.ddl.DdlTokenStream

  public void shouldParseCHARACTER_VARYING() {
    printTest("shouldParseCHARACTER_VARYING()");
    String typeString = getDataTypeString(DataTypes.DTYPE_CHARACTER_VARYING);
    String content = typeString + " (255)";
   
    DdlTokenStream tokens = getTokens(content);
     
    DataType dType = parser.parse(tokens);
   
    Assert.assertNotNull("DataType was NOT found for Type = " + typeString, dType);
    Assert.assertEquals("Wrong DataType found", typeString, dType.getName());
View Full Code Here

Examples of org.jboss.dna.sequencer.ddl.DdlTokenStream

  public void shouldParseVARCHAR() {
    printTest("shouldParseVARCHAR()");
    String typeString = getDataTypeString(DataTypes.DTYPE_VARCHAR);
    String content = typeString + " (255)";
   
    DdlTokenStream tokens = getTokens(content);
     
    DataType dType = parser.parse(tokens);
   
    Assert.assertNotNull("DataType was NOT found for Type = " + typeString, dType);
    Assert.assertEquals("Wrong DataType found", typeString, dType.getName());
View Full Code Here

Examples of org.jboss.dna.sequencer.ddl.DdlTokenStream

  public void shouldParseNATIONAL_CHAR() {
    printTest("shouldParseNATIONAL_CHAR()");
    String typeString = getDataTypeString(DataTypes.DTYPE_NATIONAL_CHAR);
    String content = typeString;
   
    DdlTokenStream tokens = getTokens(content);
     
    DataType dType = parser.parse(tokens);
   
    Assert.assertNotNull("DataType was NOT found for Type = " + typeString, dType);
    Assert.assertEquals("Wrong DataType found", typeString, dType.getName());
View Full Code Here

Examples of org.jboss.dna.sequencer.ddl.DdlTokenStream

  public void shouldParseNATIONAL_CHARACTER() {
    printTest("shouldParseNATIONAL_CHARACTER()");
    String typeString = getDataTypeString(DataTypes.DTYPE_NATIONAL_CHARACTER);
    String content = typeString;
   
    DdlTokenStream tokens = getTokens(content);
     
    DataType dType = parser.parse(tokens);
   
    Assert.assertNotNull("DataType was NOT found for Type = " + typeString, dType);
    Assert.assertEquals("Wrong DataType found", typeString, dType.getName());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.