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

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • runOnUiThread (Activity)
  • getContentResolver (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • String (java.lang)
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • 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