KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thoughtworks > acceptance > someobjects > NullTest


1 package com.thoughtworks.acceptance.someobjects;
2
3 import com.thoughtworks.acceptance.AbstractAcceptanceTest;
4
5 public class NullTest extends AbstractAcceptanceTest {
6     
7     public void testNull() {
8         String JavaDoc expected = "<null/>";
9
10         String JavaDoc xml = xstream.toXML(null);
11
12         assertEquals(expected, xml);
13         assertNull(xstream.fromXML(xml));
14     }
15 }
16
Popular Tags