Package com.ngt.jopenmetaverse.shared.structureddata

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


    @Test
    public void DeserializeInteger() throws IOException, OSDException
    {
        OSD llsdZeroInteger = BinaryLLSDOSDParser.DeserializeLLSDBinary(binaryZeroInt);
        Assert.assertEquals(OSDType.Integer, llsdZeroInteger.getType());
        Assert.assertEquals(0, llsdZeroInteger.asInteger());


        OSD llsdAnInteger = BinaryLLSDOSDParser.DeserializeLLSDBinary(binaryAnInt);
        Assert.assertEquals(OSDType.Integer, llsdAnInteger.getType());
        Assert.assertEquals(1234843, llsdAnInteger.asInteger());
View Full Code Here


        Assert.assertEquals(0, llsdZeroInteger.asInteger());


        OSD llsdAnInteger = BinaryLLSDOSDParser.DeserializeLLSDBinary(binaryAnInt);
        Assert.assertEquals(OSDType.Integer, llsdAnInteger.getType());
        Assert.assertEquals(1234843, llsdAnInteger.asInteger());
    }

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

          public void DeserializeInteger() throws OSDException, IOException
          {
              String integerOne = "i12319423";
              OSD llsdOne = NotationalLLSDOSDParser.DeserializeLLSDNotation(integerOne);
              Assert.assertEquals(OSDType.Integer, llsdOne.getType());
              Assert.assertEquals(12319423, llsdOne.asInteger());

              String integerTwo = "i-489234";
              OSD llsdTwo = NotationalLLSDOSDParser.DeserializeLLSDNotation(integerTwo);
              Assert.assertEquals(OSDType.Integer, llsdTwo.getType());
              Assert.assertEquals(-489234, llsdTwo.asInteger());
View Full Code Here

              Assert.assertEquals(12319423, llsdOne.asInteger());

              String integerTwo = "i-489234";
              OSD llsdTwo = NotationalLLSDOSDParser.DeserializeLLSDNotation(integerTwo);
              Assert.assertEquals(OSDType.Integer, llsdTwo.getType());
              Assert.assertEquals(-489234, llsdTwo.asInteger());
          }

          @Test
          public void SerializeInteger() throws IOException, OSDException
          {
View Full Code Here

              OSD llsdTwo = OSD.FromInteger(-71892034);
              String sTwo = NotationalLLSDOSDParser.SerializeLLSDNotation(llsdTwo);
              OSD llsdTwoDS = NotationalLLSDOSDParser.DeserializeLLSDNotation(sTwo);
              Assert.assertEquals(OSDType.Integer, llsdTwoDS.getType());
              Assert.assertEquals(-71892034, llsdTwoDS.asInteger());
          }

          @Test
          public void DeserializeReal() throws OSDException, IOException
          {
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.