Tabnine Logo
IllegalArgumentException.getMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
getMessage
method
in
java.lang.IllegalArgumentException

Best Java code snippets using java.lang.IllegalArgumentException.getMessage (Showing top 20 results out of 22,626)

origin: ReactiveX/RxJava

@SuppressWarnings({ "unchecked", "rawtypes" })
@Test
public void mappingBadCapacityHint() throws Exception {
  Observable<Integer> source = Observable.just(1);
  try {
    Observable.just(source, source, source).concatMapEager((Function)Functions.identity(), 10, -99);
  } catch (IllegalArgumentException ex) {
    assertEquals("prefetch > 0 required but it was -99", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void repeatLongPredicateInvalid() {
  try {
    Observable.just(1).repeat(-99);
    fail("Should have thrown");
  } catch (IllegalArgumentException ex) {
    assertEquals("times >= 0 required but it was -99", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

public void createInvalidCapacity() {
  try {
    ReplaySubject.create(-99);
    fail("Didn't throw IllegalArgumentException");
  } catch (IllegalArgumentException ex) {
    assertEquals("capacityHint > 0 required but it was -99", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void invalidSpan() {
  try {
    Observable.just(1).window(-99, 1, TimeUnit.SECONDS);
    fail("Should have thrown!");
  } catch (IllegalArgumentException ex) {
    assertEquals("timespan > 0 required but it was -99", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void createWithSizeInvalidCapacity() {
  try {
    ReplaySubject.createWithSize(-99);
    fail("Didn't throw IllegalArgumentException");
  } catch (IllegalArgumentException ex) {
    assertEquals("maxSize > 0 required but it was -99", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void negativeCount() {
  try {
    Flowable.range(1, -1);
    fail("Should have thrown IllegalArgumentException");
  } catch (IllegalArgumentException ex) {
    assertEquals("count >= 0 required but it was -1", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void createInvalidCapacity() {
  try {
    ReplayProcessor.create(-99);
    fail("Didn't throw IllegalArgumentException");
  } catch (IllegalArgumentException ex) {
    assertEquals("capacityHint > 0 required but it was -99", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void negativeCount() {
  try {
    Flowable.rangeLong(1L, -1L);
    fail("Should have thrown IllegalArgumentException");
  } catch (IllegalArgumentException ex) {
    assertEquals("count >= 0 required but it was -1", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void countNegative() {
  try {
    Flowable.intervalRange(1, -1, 1, 1, TimeUnit.MILLISECONDS);
    fail("Should have thrown!");
  } catch (IllegalArgumentException ex) {
    assertEquals("count >= 0 required but it was -1", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void createWithSizeInvalidCapacity() {
  try {
    ReplayProcessor.createWithSize(-99);
    fail("Didn't throw IllegalArgumentException");
  } catch (IllegalArgumentException ex) {
    assertEquals("maxSize > 0 required but it was -99", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void negativeCount() {
  try {
    Observable.rangeLong(1L, -1L);
    fail("Should have thrown IllegalArgumentException");
  } catch (IllegalArgumentException ex) {
    assertEquals("count >= 0 required but it was -1", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@SuppressWarnings("unchecked")
@Test
public void negativeMaxConcurrent() {
  try {
    Flowable.merge(Arrays.asList(Flowable.just(1), Flowable.just(2)), -1);
    fail("Expected IllegalArgumentException");
  } catch (IllegalArgumentException e) {
    assertEquals("maxConcurrency > 0 required but it was -1", e.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void takeNegative() {
  try {
    Flowable.just(1).take(-99);
    fail("Should have thrown");
  } catch (IllegalArgumentException ex) {
    assertEquals("count >= 0 required but it was -99", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void repeatLongPredicateInvalid() {
  try {
    Flowable.just(1).repeat(-99);
    fail("Should have thrown");
  } catch (IllegalArgumentException ex) {
    assertEquals("times >= 0 required but it was -99", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void invalidSpan() {
  try {
    Flowable.just(1).window(-99, 1, TimeUnit.SECONDS);
    fail("Should have thrown!");
  } catch (IllegalArgumentException ex) {
    assertEquals("timespan > 0 required but it was -99", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void createWithTimeAndSizeInvalidCapacity() {
  try {
    ReplaySubject.createWithTimeAndSize(1, TimeUnit.DAYS, Schedulers.computation(), -99);
    fail("Didn't throw IllegalArgumentException");
  } catch (IllegalArgumentException ex) {
    assertEquals("maxSize > 0 required but it was -99", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void invalidPrefetch() {
  try {
    Completable.concat(Flowable.just(Completable.complete()), -99);
    fail("Should have thrown IllegalArgumentExceptio");
  } catch (IllegalArgumentException ex) {
    assertEquals("prefetch > 0 required but it was -99", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void longOverflow() {
  Observable.intervalRange(Long.MAX_VALUE - 1, 2, 1, 1, TimeUnit.MILLISECONDS);
  Observable.intervalRange(Long.MIN_VALUE, Long.MAX_VALUE, 1, 1, TimeUnit.MILLISECONDS);
  try {
    Observable.intervalRange(Long.MAX_VALUE - 1, 3, 1, 1, TimeUnit.MILLISECONDS);
    fail("Should have thrown!");
  } catch (IllegalArgumentException ex) {
    assertEquals("Overflow! start + count is bigger than Long.MAX_VALUE", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@SuppressWarnings({ "unchecked", "rawtypes" })
@Test
public void mappingBadCapacityHint() throws Exception {
  Flowable<Integer> source = Flowable.just(1);
  try {
    Flowable.just(source, source, source).concatMapEager((Function)Functions.identity(), 10, -99);
  } catch (IllegalArgumentException ex) {
    assertEquals("prefetch > 0 required but it was -99", ex.getMessage());
  }
}
origin: ReactiveX/RxJava

@Test
public void invalidPrefetch() {
  try {
    Completable.merge(Flowable.just(Completable.complete()), -99);
    fail("Should have thrown IllegalArgumentExceptio");
  } catch (IllegalArgumentException ex) {
    assertEquals("maxConcurrency > 0 required but it was -99", ex.getMessage());
  }
}
java.langIllegalArgumentExceptiongetMessage

Popular methods of IllegalArgumentException

  • <init>
    Constructs a new exception with the specified cause and a detail message of (cause==null ? null : c
  • printStackTrace
  • initCause
  • toString
  • getLocalizedMessage
  • getStackTrace
  • setStackTrace
  • getCause
  • addSuppressed
  • fillInStackTrace
  • getSuppressed
  • getSuppressed

Popular in Java

  • Running tasks concurrently on multiple threads
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Reference (javax.naming)
  • JLabel (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Option (scala)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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