Tabnine Logo
JsonMap.getLong
Code IndexAdd Tabnine to your IDE (free)

How to use
getLong
method
in
de.otto.edison.testsupport.util.JsonMap

Best Java code snippets using de.otto.edison.testsupport.util.JsonMap.getLong (Showing top 5 results out of 315)

origin: otto-de/edison-microservice

public long getLong(final String key, final long defaultValue) {
  final Long result = getLong(key);
  return result != null ? result : defaultValue;
}
origin: otto-de/edison-microservice

@Test
public void shouldReturnNullIfLongValueIsNotPresentAndNoDefaultSpecified() {
  final JsonMap empty = jsonMapFrom(new HashMap<String, Object>());
  assertThat(empty.getLong("key"), is(nullValue()));
}
origin: otto-de/edison-microservice

@Test
public void shouldGetLongFromString() {
  final Map<String, ?> map = singletonMap("key", "1");
  assertThat(jsonMapFrom(map).getLong("key"), is(1L));
}
origin: otto-de/edison-microservice

@Test
public void shouldGetLong() {
  final Map<String, ?> map = singletonMap("key", 1L);
  assertThat(jsonMapFrom(map).getLong("key"), is(1L));
}
origin: otto-de/edison-microservice

@Test
public void shouldFallbackOnDefaultLong() {
  final JsonMap empty = jsonMapFrom(new HashMap<String, Object>());
  assertThat(empty.getLong("key", 1L), is(1L));
}
de.otto.edison.testsupport.utilJsonMapgetLong

Popular methods of JsonMap

  • get
  • getString
  • getBoolean
  • getDouble
  • getInt
  • jsonMapFrom
  • <init>
  • asListOf
  • getDate
  • getFloat
  • getInstant
  • is
  • getInstant,
  • is,
  • remove,
  • toString

Popular in Java

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • scheduleAtFixedRate (Timer)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Notification (javax.management)
  • Top Vim plugins
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