Details
-
Type: Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.2
-
Component/s: None
-
Labels:None
Description
public static class House {
@XStreamAlias("total-number-of-rooms")
private int rooms;
protected House(int rooms)
public int getRooms()
{ return rooms; }}
public void testAnnotationForFieldAliases()
{ Annotations.configureAliases(xstream, House.class); House house = new House(5); String expectedXml = "<com.thoughtworks.acceptance.annotations.AnnotationsTest-House>\n"+ " <total-number-of-rooms>5</total-number-of-rooms>\n" + "</com.thoughtworks.acceptance.annotations.AnnotationsTest-House>"; assertBothWays(house, expectedXml); }