Package com.ngt.jopenmetaverse.shared.structureddata

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSD.asBoolean()


//          data.getMap(data);
         
          if ((osd = map.get("login")) !=null)
          {
            boolean loginSuccess = osd.asBoolean();
            boolean redirect = (osd.asString().equals("indeterminate"));

            if (redirect)
            {
              // Login redirected
View Full Code Here


    @Test
    public void DeserializeBool() throws IOException, OSDException
    {
        OSD llsdTrue = BinaryLLSDOSDParser.DeserializeLLSDBinary(binaryTrue);
        Assert.assertEquals(OSDType.Boolean, llsdTrue.getType());
        Assert.assertTrue(llsdTrue.asBoolean());

        OSD llsdFalse = BinaryLLSDOSDParser.DeserializeLLSDBinary(binaryFalse);
        Assert.assertEquals(OSDType.Boolean, llsdFalse.getType());
        Assert.assertFalse(llsdFalse.asBoolean());
    }
View Full Code Here

        Assert.assertEquals(OSDType.Boolean, llsdTrue.getType());
        Assert.assertTrue(llsdTrue.asBoolean());

        OSD llsdFalse = BinaryLLSDOSDParser.DeserializeLLSDBinary(binaryFalse);
        Assert.assertEquals(OSDType.Boolean, llsdFalse.getType());
        Assert.assertFalse(llsdFalse.asBoolean());
    }

    @Test
    public void SerializeBool() throws Exception
    {
View Full Code Here

          public void DeserializeBoolean() throws OSDException, IOException
          {
              String t = "true";
              OSD llsdT = NotationalLLSDOSDParser.DeserializeLLSDNotation(t);
              Assert.assertEquals(OSDType.Boolean, llsdT.getType());
              Assert.assertTrue(llsdT.asBoolean());

              String tTwo = "t";
              OSD llsdTTwo = NotationalLLSDOSDParser.DeserializeLLSDNotation(tTwo);
              Assert.assertEquals(OSDType.Boolean, llsdTTwo.getType());
              Assert.assertTrue(llsdTTwo.asBoolean());
View Full Code Here

              Assert.assertTrue(llsdT.asBoolean());

              String tTwo = "t";
              OSD llsdTTwo = NotationalLLSDOSDParser.DeserializeLLSDNotation(tTwo);
              Assert.assertEquals(OSDType.Boolean, llsdTTwo.getType());
              Assert.assertTrue(llsdTTwo.asBoolean());

              String tThree = "TRUE";
              OSD llsdTThree = NotationalLLSDOSDParser.DeserializeLLSDNotation(tThree);
              Assert.assertEquals(OSDType.Boolean, llsdTThree.getType());
              Assert.assertTrue(llsdTThree.asBoolean());
View Full Code Here

              Assert.assertTrue(llsdTTwo.asBoolean());

              String tThree = "TRUE";
              OSD llsdTThree = NotationalLLSDOSDParser.DeserializeLLSDNotation(tThree);
              Assert.assertEquals(OSDType.Boolean, llsdTThree.getType());
              Assert.assertTrue(llsdTThree.asBoolean());

              String tFour = "T";
              OSD llsdTFour = NotationalLLSDOSDParser.DeserializeLLSDNotation(tFour);
              Assert.assertEquals(OSDType.Boolean, llsdTFour.getType());
              Assert.assertTrue(llsdTFour.asBoolean());
View Full Code Here

              Assert.assertTrue(llsdTThree.asBoolean());

              String tFour = "T";
              OSD llsdTFour = NotationalLLSDOSDParser.DeserializeLLSDNotation(tFour);
              Assert.assertEquals(OSDType.Boolean, llsdTFour.getType());
              Assert.assertTrue(llsdTFour.asBoolean());

              String tFive = "1";
              OSD llsdTFive = NotationalLLSDOSDParser.DeserializeLLSDNotation(tFive);
              Assert.assertEquals(OSDType.Boolean, llsdTFive.getType());
              Assert.assertTrue(llsdTFive.asBoolean());
View Full Code Here

              Assert.assertTrue(llsdTFour.asBoolean());

              String tFive = "1";
              OSD llsdTFive = NotationalLLSDOSDParser.DeserializeLLSDNotation(tFive);
              Assert.assertEquals(OSDType.Boolean, llsdTFive.getType());
              Assert.assertTrue(llsdTFive.asBoolean());

              String f = "false";
              OSD llsdF = NotationalLLSDOSDParser.DeserializeLLSDNotation(f);
              Assert.assertEquals(OSDType.Boolean, llsdF.getType());
              Assert.assertFalse(llsdF.asBoolean());
View Full Code Here

              Assert.assertTrue(llsdTFive.asBoolean());

              String f = "false";
              OSD llsdF = NotationalLLSDOSDParser.DeserializeLLSDNotation(f);
              Assert.assertEquals(OSDType.Boolean, llsdF.getType());
              Assert.assertFalse(llsdF.asBoolean());

              String fTwo = "f";
              OSD llsdFTwo = NotationalLLSDOSDParser.DeserializeLLSDNotation(fTwo);
              Assert.assertEquals(OSDType.Boolean, llsdFTwo.getType());
              Assert.assertFalse(llsdFTwo.asBoolean());
View Full Code Here

              Assert.assertFalse(llsdF.asBoolean());

              String fTwo = "f";
              OSD llsdFTwo = NotationalLLSDOSDParser.DeserializeLLSDNotation(fTwo);
              Assert.assertEquals(OSDType.Boolean, llsdFTwo.getType());
              Assert.assertFalse(llsdFTwo.asBoolean());

              String fThree = "FALSE";
              OSD llsdFThree = NotationalLLSDOSDParser.DeserializeLLSDNotation(fThree);
              Assert.assertEquals(OSDType.Boolean, llsdFThree.getType());
              Assert.assertFalse(llsdFThree.asBoolean());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.