@Test
public void DeserializeBoolean()
{
OSD theSD = null;
OSDArray array = null;
OSDBoolean tempBool = null;
String testSD = "<?xml version='1.0' encoding='UTF-8'?> \n" +
"<llsd> \n" +
"<array> \n" +
"<boolean>1</boolean> \n" +
"<boolean>true</boolean> \n" +
"<boolean>0</boolean> \n" +
"<boolean>false</boolean> \n" +
"<boolean/> \n" +
"</array> \n" +
"</llsd>";
//Deserialize the string
byte[] bytes = Utils.stringToBytes(testSD);
theSD =XmlLLSDOSDParser.DeserializeLLSDXml(bytes);
Assert.assertTrue(theSD instanceof OSDArray);
array = (OSDArray)theSD;
Assert.assertEquals(OSDType.Boolean, array.get(0).getType());
tempBool = (OSDBoolean)array.get(0);
Assert.assertEquals(true, tempBool.asBoolean());
Assert.assertEquals(OSDType.Boolean, array.get(1).getType());
tempBool = (OSDBoolean)array.get(1);
Assert.assertEquals(true, tempBool.asBoolean());
Assert.assertEquals(OSDType.Boolean, array.get(2).getType());
tempBool = (OSDBoolean)array.get(2);
Assert.assertEquals(false, tempBool.asBoolean());
Assert.assertEquals(OSDType.Boolean, array.get(3).getType());
tempBool = (OSDBoolean)array.get(3);
Assert.assertEquals(false, tempBool.asBoolean());
Assert.assertEquals(OSDType.Boolean, array.get(4).getType());
tempBool = (OSDBoolean)array.get(4);
Assert.assertEquals(false, tempBool.asBoolean());
}