Package org.hornetq.api.core

Examples of org.hornetq.api.core.SimpleString.split()


   }

   public void testSplitNoDelimeter() throws Exception
   {
      SimpleString s = new SimpleString("abcdefghi");
      SimpleString[] strings = s.split('.');
      Assert.assertNotNull(strings);
      Assert.assertEquals(strings.length, 1);
      Assert.assertEquals(strings[0], s);
   }
View Full Code Here


   }

   public void testSplit1Delimeter() throws Exception
   {
      SimpleString s = new SimpleString("abcd.efghi");
      SimpleString[] strings = s.split('.');
      Assert.assertNotNull(strings);
      Assert.assertEquals(strings.length, 2);
      Assert.assertEquals(strings[0], new SimpleString("abcd"));
      Assert.assertEquals(strings[1], new SimpleString("efghi"));
   }
View Full Code Here

   }

   public void testSplitmanyDelimeters() throws Exception
   {
      SimpleString s = new SimpleString("abcd.efghi.jklmn.opqrs.tuvw.xyz");
      SimpleString[] strings = s.split('.');
      Assert.assertNotNull(strings);
      Assert.assertEquals(strings.length, 6);
      Assert.assertEquals(strings[0], new SimpleString("abcd"));
      Assert.assertEquals(strings[1], new SimpleString("efghi"));
      Assert.assertEquals(strings[2], new SimpleString("jklmn"));
View Full Code Here

         SimpleString s2 = s.concat(c);
         assertEquals(msg, c, s2.charAt(1));

         // test splitting with chars
         SimpleString sSplit = new SimpleString("foo" + String.valueOf(c) + "bar");
         SimpleString[] chunks = sSplit.split(c);
         SimpleString[] split1 = p1.split(c);
         SimpleString[] split2 = p2.split(c);
         assertEquals(split1.length + split2.length, chunks.length);
         int j = 0;
View Full Code Here

   }

   public void testSplitNoDelimeter() throws Exception
   {
      SimpleString s = new SimpleString("abcdefghi");
      SimpleString[] strings = s.split('.');
      Assert.assertNotNull(strings);
      Assert.assertEquals(strings.length, 1);
      Assert.assertEquals(strings[0], s);
   }
View Full Code Here

   }

   public void testSplit1Delimeter() throws Exception
   {
      SimpleString s = new SimpleString("abcd.efghi");
      SimpleString[] strings = s.split('.');
      Assert.assertNotNull(strings);
      Assert.assertEquals(strings.length, 2);
      Assert.assertEquals(strings[0], new SimpleString("abcd"));
      Assert.assertEquals(strings[1], new SimpleString("efghi"));
   }
View Full Code Here

   }

   public void testSplitmanyDelimeters() throws Exception
   {
      SimpleString s = new SimpleString("abcd.efghi.jklmn.opqrs.tuvw.xyz");
      SimpleString[] strings = s.split('.');
      Assert.assertNotNull(strings);
      Assert.assertEquals(strings.length, 6);
      Assert.assertEquals(strings[0], new SimpleString("abcd"));
      Assert.assertEquals(strings[1], new SimpleString("efghi"));
      Assert.assertEquals(strings[2], new SimpleString("jklmn"));
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.