Package org.xmlBlaster.util.qos

Examples of org.xmlBlaster.util.qos.ClientProperty.toXml()


         assertEquals("", null, clientProperty.getValueRaw());
         assertEquals("", null, clientProperty.getStringValue());
         assertEquals("", null, clientProperty.getObjectValue());

         clientProperty.setValue("true");
         String xml = clientProperty.toXml();
         assertEquals("", "true", clientProperty.getValueRaw());
         assertXMLEqual("comparing test xml to control xml",
                        "<clientProperty name='key' type='boolean'>true</clientProperty>",
                        xml);
         assertEquals("", true, clientProperty.getBooleanValue());
View Full Code Here


         assertEquals("", null, clientProperty.getValueRaw());
         assertEquals("", null, clientProperty.getStringValue());
         assertEquals("", null, clientProperty.getObjectValue());

         clientProperty.setValue("12.78");
         String xml = clientProperty.toXml();
         assertEquals("", "12.78", clientProperty.getValueRaw());
         assertXMLEqual("comparing test xml to control xml",
                        "<clientProperty name='key' type='double'>12.78</clientProperty>",
                        xml);
         assertTrue("", 12.78 == clientProperty.getDoubleValue());
View Full Code Here

         assertEquals("", null, clientProperty.getValueRaw());
         assertEquals("", null, clientProperty.getStringValue());
         assertEquals("", null, clientProperty.getObjectValue());

         clientProperty.setValue("12.54");
         String xml = clientProperty.toXml();
         assertEquals("", "12.54", clientProperty.getValueRaw());
         assertXMLEqual("comparing test xml to control xml",
                        "<clientProperty name='key' type='float'>12.54</clientProperty>",
                        xml);
         assertTrue("", (float)12.54 == clientProperty.getFloatValue());
View Full Code Here

         assertEquals("", null, clientProperty.getValueRaw());
         assertEquals("", null, clientProperty.getStringValue());
         assertEquals("", null, clientProperty.getObjectValue());

         clientProperty.setValue("6");
         String xml = clientProperty.toXml();
         assertEquals("", "6", clientProperty.getValueRaw());
         assertXMLEqual("comparing test xml to control xml",
                        "<clientProperty name='key' type='byte'>6</clientProperty>",
                        xml);
         assertTrue("", (byte)6 == clientProperty.getByteValue());
View Full Code Here

         assertEquals("", null, clientProperty.getValueRaw());
         assertEquals("", null, clientProperty.getStringValue());
         assertEquals("", null, clientProperty.getObjectValue());

         clientProperty.setValue("888888");
         String xml = clientProperty.toXml();
         assertEquals("", "888888", clientProperty.getValueRaw());
         assertXMLEqual("comparing test xml to control xml",
                        "<clientProperty name='key' type='long'>888888</clientProperty>",
                        xml);
         assertTrue("", 888888 == clientProperty.getLongValue());
View Full Code Here

         assertEquals("", null, clientProperty.getValueRaw());
         assertEquals("", null, clientProperty.getStringValue());
         assertEquals("", null, clientProperty.getObjectValue());

         clientProperty.setValue("12");
         String xml = clientProperty.toXml();
         assertEquals("", "12", clientProperty.getValueRaw());
         assertXMLEqual("comparing test xml to control xml",
                        "<clientProperty name='key' type='short'>12</clientProperty>",
                        xml);
         assertTrue("", 12 == clientProperty.getShortValue());
View Full Code Here

         bb[5] = 0;
         clientProperty.setValue(bb);
         assertEquals("", "byte[]", clientProperty.getType());
         assertEquals("", Constants.ENCODING_BASE64, clientProperty.getEncoding());
         assertEquals("", true, clientProperty.isBase64());
         String xml = clientProperty.toXml();
         byte[] newVal = clientProperty.getBlobValue();
         for (int i=0; i<bb.length; i++)
            assertTrue("Index #"+i, bb[i] == newVal[i]);
         assertXpathExists("/clientProperty[@name='key']", xml);
         assertXpathExists("/clientProperty[@type='"+Constants.TYPE_BLOB+"']", xml);
View Full Code Here

         "</qos>";     
     
      MsgQosSaxFactory parser = new MsgQosSaxFactory(this.glob);
      MsgQosData data = parser.readObject(xml);
      ClientProperty prop = data.getClientProperty("StringKey");
      System.out.println(prop.toXml());
      assertEquals("", true, prop.isBase64());
     
   }

   public void testClientPropertyParsingWithUntrimmedSpaces() throws Exception {
View Full Code Here

         "</qos>";     
     
      MsgQosSaxFactory parser = new MsgQosSaxFactory(this.glob);
      MsgQosData data = parser.readObject(xml);
      ClientProperty prop = data.getClientProperty("StringKey");
      System.out.println(prop.toXml());
      // assertEquals("", true, prop.isBase64());
     
     
      String val = "<BlaBla attr1='val1' attr2=' val2 '> Something </BlaBla>";
      prop = new ClientProperty("StringKey", null, Constants.ENCODING_FORCE_PLAIN, val);
View Full Code Here

      // assertEquals("", true, prop.isBase64());
     
     
      String val = "<BlaBla attr1='val1' attr2=' val2 '> Something </BlaBla>";
      prop = new ClientProperty("StringKey", null, Constants.ENCODING_FORCE_PLAIN, val);
      System.out.println(prop.toXml());

      xml =  "<qos>\n" +
      "  <isPublish/>\n" +
      "  <clientProperty name='StringKey' type='' encoding='forcePlain'><qos attr1='val1' attr2=' val2 '> Something </qos></clientProperty>\n" +
      "</qos>";     
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.