congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
RandomUtil.randomInt
Code IndexAdd Tabnine to your IDE (free)

How to use
randomInt
method
in
org.apache.activemq.artemis.utils.RandomUtil

Best Java code snippets using org.apache.activemq.artemis.utils.RandomUtil.randomInt (Showing top 20 results out of 315)

origin: wildfly/wildfly

public static int randomPositiveInt() {
 return Math.abs(RandomUtil.randomInt());
}
origin: apache/activemq-artemis

public static int randomPositiveInt() {
 return Math.abs(RandomUtil.randomInt());
}
origin: apache/activemq-artemis

public static int randomPositiveInt() {
 return Math.abs(RandomUtil.randomInt());
}
origin: apache/activemq-artemis

public static int randomPositiveInt() {
 return Math.abs(RandomUtil.randomInt());
}
origin: org.apache.activemq/artemis-jms-client-all

public static int randomPositiveInt() {
 return Math.abs(RandomUtil.randomInt());
}
origin: org.apache.activemq/artemis-commons

public static int randomPositiveInt() {
 return Math.abs(RandomUtil.randomInt());
}
origin: apache/activemq-artemis

@Test
public void testWriteObjectWithInt() throws Exception {
 doWriteObjectWithType(RandomUtil.randomInt(), new TypeReader() {
   @Override
   public Object readType(final ActiveMQStreamMessage message) throws Exception {
    return message.readInt();
   }
 });
}
origin: apache/activemq-artemis

@Test
public void testSetObjectFromInt() throws Exception {
 doTestSetObject(RandomUtil.randomInt());
}
origin: apache/activemq-artemis

@Test
public void testGetIntFromString() throws Exception {
 int value = RandomUtil.randomInt();
 ActiveMQMapMessage message = new ActiveMQMapMessage();
 message.setString(itemName, Integer.toString(value));
 Assert.assertEquals(value, message.getInt(itemName));
}
origin: apache/activemq-artemis

@Test
public void testGetStringFromInt() throws Exception {
 int value = RandomUtil.randomInt();
 ActiveMQMapMessage message = new ActiveMQMapMessage();
 message.setInt(itemName, value);
 Assert.assertEquals(Integer.toString(value), message.getString(itemName));
}
origin: apache/activemq-artemis

@Test
public void testInt() throws Exception {
 int i = RandomUtil.randomInt();
 wrapper.writeInt(i);
 Assert.assertEquals(i, wrapper.readInt());
}
origin: apache/activemq-artemis

@Test
public void testIntAtPosition() throws Exception {
 int firstInt = RandomUtil.randomInt();
 int secondInt = RandomUtil.randomInt();
 wrapper.writeInt(secondInt);
 wrapper.writeInt(secondInt);
 // rewrite firstInt at the beginning
 wrapper.setInt(0, firstInt);
 Assert.assertEquals(firstInt, wrapper.readInt());
 Assert.assertEquals(secondInt, wrapper.readInt());
}
origin: apache/activemq-artemis

@Test
public void testReadStringFromInt() throws Exception {
 int value = RandomUtil.randomInt();
 ActiveMQStreamMessage message = new ActiveMQStreamMessage();
 message.writeInt(value);
 message.reset();
 Assert.assertEquals(Integer.toString(value), message.readString());
}
origin: apache/activemq-artemis

@Test
public void testReadIntFromString() throws Exception {
 int value = RandomUtil.randomInt();
 ActiveMQStreamMessage message = new ActiveMQStreamMessage();
 message.writeString(Integer.toString(value));
 message.reset();
 Assert.assertEquals(value, message.readInt());
}
origin: apache/activemq-artemis

@Test
public void testGetLongFromInt() throws Exception {
 int value = RandomUtil.randomInt();
 ActiveMQMapMessage message = new ActiveMQMapMessage();
 message.setInt(itemName, value);
 Assert.assertEquals(value, message.getLong(itemName));
}
origin: apache/activemq-artemis

@Test
public void testGetIntFromInt() throws Exception {
 int value = RandomUtil.randomInt();
 ActiveMQMapMessage message = new ActiveMQMapMessage();
 message.setInt(itemName, value);
 Assert.assertEquals(value, message.getInt(itemName));
}
origin: apache/activemq-artemis

@Test
public void testReadLongFromInt() throws Exception {
 int value = RandomUtil.randomInt();
 ActiveMQStreamMessage message = new ActiveMQStreamMessage();
 message.writeInt(value);
 message.reset();
 Assert.assertEquals(value, message.readLong());
}
origin: apache/activemq-artemis

@Test
public void testReadIntFromInt() throws Exception {
 int value = RandomUtil.randomInt();
 ActiveMQStreamMessage message = new ActiveMQStreamMessage();
 message.writeInt(value);
 message.reset();
 Assert.assertEquals(value, message.readInt());
}
origin: apache/activemq-artemis

@Test
public void testReadObjectFromInt() throws Exception {
 int value = RandomUtil.randomInt();
 ActiveMQStreamMessage message = new ActiveMQStreamMessage();
 message.writeInt(value);
 message.reset();
 Assert.assertEquals(value, message.readObject());
}
origin: apache/activemq-artemis

@Test
public void testRewind() throws Exception {
 int i = RandomUtil.randomInt();
 wrapper.writeInt(i);
 Assert.assertEquals(i, wrapper.readInt());
 wrapper.resetReaderIndex();
 Assert.assertEquals(i, wrapper.readInt());
}
org.apache.activemq.artemis.utilsRandomUtilrandomInt

Popular methods of RandomUtil

  • randomLong
  • randomString
  • randomByte
  • randomBytes
  • randomPositiveInt
  • randomInterval
  • randomBoolean
  • randomDouble
  • randomSimpleString
  • randomChar
  • randomPositiveLong
  • randomFloat
  • randomPositiveLong,
  • randomFloat,
  • randomShort,
  • getRandom,
  • randomBuffer

Popular in Java

  • Reading from database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Collectors (java.util.stream)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now