}
public void DeserializeString() throws OSDException, IOException
{
String sOne = "''";
OSD llsdOne = NotationalLLSDOSDParser.DeserializeLLSDNotation(sOne);
Assert.assertEquals(OSDType.String, llsdOne.getType());
Assert.assertEquals("", llsdOne.asString());
// This is double escaping. Once for the encoding, and once for csharp.
String sTwo = "'test\\'\"test'";
OSD llsdTwo = NotationalLLSDOSDParser.DeserializeLLSDNotation(sTwo);
Assert.assertEquals(OSDType.String, llsdTwo.getType());
Assert.assertEquals("test'\"test", llsdTwo.asString());
// "test \\lest"
char[] cThree = { (char)0x27, (char)0x74, (char)0x65, (char)0x73, (char)0x74, (char)0x20, (char)0x5c,
(char)0x5c, (char)0x6c, (char)0x65, (char)0x73, (char)0x74, (char)0x27 };
String sThree = new String(cThree);
OSD llsdThree = NotationalLLSDOSDParser.DeserializeLLSDNotation(sThree);
Assert.assertEquals(OSDType.String, llsdThree.getType());
Assert.assertEquals("test \\lest", llsdThree.asString());
String sFour = "'aa\t la'";
OSD llsdFour = NotationalLLSDOSDParser.DeserializeLLSDNotation(sFour);
Assert.assertEquals(OSDType.String, llsdFour.getType());
Assert.assertEquals("aa\t la", llsdFour.asString());
char[] cFive = { (char)0x27, (char)0x5c, (char)0x5c, (char)0x27 };
String sFive = new String(cFive);
OSD llsdFive = NotationalLLSDOSDParser.DeserializeLLSDNotation(sFive);
Assert.assertEquals(OSDType.String, llsdFive.getType());
Assert.assertEquals("\\", llsdFive.asString());
String sSix = "s(10)\"1234567890\"";
OSD llsdSix = NotationalLLSDOSDParser.DeserializeLLSDNotation(sSix);
Assert.assertEquals(OSDType.String, llsdSix.getType());
Assert.assertEquals("1234567890", llsdSix.asString());
String sSeven = "s(5)\"\\\\\\\\\\\"";
OSD llsdSeven = NotationalLLSDOSDParser.DeserializeLLSDNotation(sSeven);
Assert.assertEquals(OSDType.String, llsdSeven.getType());
Assert.assertEquals("\\\\\\\\\\", llsdSeven.asString());
String sEight = "\"aouAOUhsdjklfghskldjfghqeiurtzwieortzaslxfjkgh\"";
OSD llsdEight = NotationalLLSDOSDParser.DeserializeLLSDNotation(sEight);
Assert.assertEquals(OSDType.String, llsdEight.getType());
Assert.assertEquals("aouAOUhsdjklfghskldjfghqeiurtzwieortzaslxfjkgh", llsdEight.asString());
}