Package com.toc.dton

Examples of com.toc.dton.Notation


      testList.add("Test 1");
      testList.add("Test 3");
      testList.add(null);
      testList.add("Test 2");
      //ParserObject obj = new ParserObject(testList);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testList, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode List");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode List");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here


      testList.add("Test String");
      testList.add(1);
      testList.add(null);
      testList.add(new TestBean());
      //ParserObject obj = new ParserObject(testList);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testList, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode List");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode List");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

  public void testBlankListEncode() {
    ArrayList<String> testList = new ArrayList<String>();
    String parseResult;
    try {
      //ParserObject obj = new ParserObject(testList);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testList, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode List");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode List");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

  public void testNullListEncode() {
    ArrayList<String> testList = null;
    String parseResult;
    try {
      //ParserObject obj = new ParserObject(testList);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testList, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode Null List");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode Null List");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

  public void testIntegerEncode() {
    Integer testInteger = 1234;
    String parseResult;
    try {
      //ParserObject obj = new ParserObject(testInteger);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testInteger, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode Integer");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode Integer");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

  public void testIntEncode() {
    int testInt = 1234;
    String parseResult;
    try {
      //ParserObject obj = new ParserObject(testInt);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testInt, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode int");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode int");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

  public void testStringEncode() {
    String testString = "  Test {}[]!@#$%^&*()-=\\_+|~`;':\",./<>? \n 1234 ";
    String parseResult;
    try {
      //ParserObject obj = new ParserObject(testString);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testString, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode String");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode String");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

  public void testBlankStringEncode() {
    String testString = "";
    String parseResult;
    try {
      //ParserObject obj = new ParserObject(testString);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testString, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode Blank String");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode Blank String");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

  public void testNullStringEncode() {
    String testString = null;
    String parseResult;
    try {
      //ParserObject obj = new ParserObject(testString);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testString, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode Null String");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode Null String");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

      TestBean testBean = new TestBean();
      testBean.setTestBean(testSubBean);
      testBean.setTestInt(1234);
      testBean.setTestString("Test");
     
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testBean, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode Bean");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode Bean");
      System.out.println("------------------");
      System.out.println(analysisResult);
      assertEquals("Failed Test Transfer String",testBean,analysisResult);
View Full Code Here

TOP

Related Classes of com.toc.dton.Notation

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.