org.apache.commons.betwixt.dotbetwixt
Class TestMsgParser

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.betwixt.dotbetwixt.TestMsgParser
All Implemented Interfaces:
junit.framework.Test

public class TestMsgParser
extends junit.framework.TestCase

Tests the marshalling and unmarshalling of MsgBeans with Betwixt. The problem tested here is that an element without an updater would not process it's attributes correctly even though they had updaters.

Version:
$Id: TestMsgParser.java 438373 2006-08-30 05:17:21Z bayard $
Author:
Mike Stanley

Constructor Summary
TestMsgParser()
           
 
Method Summary
static java.lang.String getAsXml(MsgBean msg)
          Returns the bean as an xml string.
static MsgBean parseMsg(java.lang.String xmlMessage)
          Parses the passed in message xml
protected  void setUp()
           
 void testGetAsXml()
           
 void testParseMsg()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestMsgParser

public TestMsgParser()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

testGetAsXml

public void testGetAsXml()
                  throws java.lang.Exception
Throws:
java.lang.Exception

testParseMsg

public void testParseMsg()
                  throws java.lang.Exception
Throws:
java.lang.Exception

getAsXml

public static final java.lang.String getAsXml(MsgBean msg)
                                       throws java.lang.Exception
Returns the bean as an xml string.

Parameters:
msg -
Returns:
Throws:
java.lang.Exception

parseMsg

public static final MsgBean parseMsg(java.lang.String xmlMessage)
                              throws java.lang.Exception
Parses the passed in message xml

Parameters:
xmlMessage -
Returns:
Throws:
java.lang.Exception


Copyright © 2002-2008 The Apache Software Foundation. All Rights Reserved.