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

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

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

origin: otto-de/edison-microservice

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

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

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

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

Popular methods of JsonMap

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

Popular in Java

  • Making http requests using okhttp
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
  • getApplicationContext (Context)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • 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