congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Arg0ToPagedIterableTest.args
Code IndexAdd Tabnine to your IDE (free)

How to use
args
method
in
org.jclouds.collect.internal.Arg0ToPagedIterableTest

Best Java code snippets using org.jclouds.collect.internal.Arg0ToPagedIterableTest.args (Showing top 6 results out of 315)

origin: jclouds/legacy-jclouds

@Test
public void testWhenNextMarkerAbsentDoesntAdvance() {
 GeneratedHttpRequest request = args(ImmutableList.of());
 TestArg0 converter = new TestArg0(request) {
   @Override
   protected Function<Object, IterableWithMarker<String>> markerToNextForArg0(Optional<Object> arg0) {
    fail();
    return null;
   }
 };
 assertEquals(converter.apply(IterableWithMarkers.from(ImmutableSet.of("foo", "bar"))).concat().toSet(),
    ImmutableSet.of("foo", "bar"));
}
origin: jclouds/legacy-jclouds

@Test
public void testWhenNextMarkerPresentWithArgsMarkerToNextForArg0ParamIsPresent() {
 GeneratedHttpRequest request = args(ImmutableList.<Object> of("path"));
 final IterableWithMarker<String> next = IterableWithMarkers.from(ImmutableSet.of("baz"));
 TestArg0 converter = new TestArg0(request) {
   @Override
   protected Function<Object, IterableWithMarker<String>> markerToNextForArg0(Optional<Object> arg0) {
    assertEquals(arg0, Optional.of("path"));
    return Functions.constant(next);
   }
 };
 assertEquals(converter.apply(IterableWithMarkers.from(ImmutableSet.of("foo", "bar"), "marker")).concat().toSet(),
    ImmutableSet.of("foo", "bar", "baz"));
}
origin: apache/jclouds

@Test
public void testWhenNextMarkerAbsentDoesntAdvance() {
 GeneratedHttpRequest request = args(ImmutableList.of());
 TestArg0 converter = new TestArg0(request) {
   @Override
   protected Function<Object, IterableWithMarker<String>> markerToNextForArg0(Optional<Object> arg0) {
    fail("The Iterable should not advance");
    return null;
   }
 };
 assertEquals(converter.apply(IterableWithMarkers.from(ImmutableSet.of("foo", "bar"))).concat().toSet(),
    ImmutableSet.of("foo", "bar"));
}
origin: apache/jclouds

@Test
public void testWhenNextMarkerPresentWithArgsMarkerToNextForArg0ParamIsPresent() {
 GeneratedHttpRequest request = args(ImmutableList.<Object> of("path"));
 final IterableWithMarker<String> next = IterableWithMarkers.from(ImmutableSet.of("baz"));
 TestArg0 converter = new TestArg0(request) {
   @Override
   protected Function<Object, IterableWithMarker<String>> markerToNextForArg0(Optional<Object> arg0) {
    assertEquals(arg0, Optional.of("path"));
    return Functions.constant(next);
   }
 };
 assertEquals(converter.apply(IterableWithMarkers.from(ImmutableSet.of("foo", "bar"), "marker")).concat().toSet(),
    ImmutableSet.of("foo", "bar", "baz"));
}
origin: apache/jclouds

@Test
public void testWhenNextMarkerPresentButNoArgsMarkerToNextForArg0ParamIsAbsent() {
 GeneratedHttpRequest request = args(ImmutableList.of());
 final IterableWithMarker<String> next = IterableWithMarkers.from(ImmutableSet.of("baz"));
 TestArg0 converter = new TestArg0(request) {
   @Override
   protected Function<Object, IterableWithMarker<String>> markerToNextForArg0(Optional<Object> arg0) {
    assertEquals(arg0, Optional.absent());
    return Functions.constant(next);
   }
 };
 assertEquals(converter.apply(IterableWithMarkers.from(ImmutableSet.of("foo", "bar"), "marker")).concat().toSet(),
    ImmutableSet.of("foo", "bar", "baz"));
}
origin: jclouds/legacy-jclouds

@Test
public void testWhenNextMarkerPresentButNoArgsMarkerToNextForArg0ParamIsAbsent() {
 GeneratedHttpRequest request = args(ImmutableList.of());
 final IterableWithMarker<String> next = IterableWithMarkers.from(ImmutableSet.of("baz"));
 TestArg0 converter = new TestArg0(request) {
   @Override
   protected Function<Object, IterableWithMarker<String>> markerToNextForArg0(Optional<Object> arg0) {
    assertEquals(arg0, Optional.absent());
    return Functions.constant(next);
   }
 };
 assertEquals(converter.apply(IterableWithMarkers.from(ImmutableSet.of("foo", "bar"), "marker")).concat().toSet(),
    ImmutableSet.of("foo", "bar", "baz"));
}
org.jclouds.collect.internalArg0ToPagedIterableTestargs

Popular methods of Arg0ToPagedIterableTest

  • callerArgs

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
  • setScale (BigDecimal)
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Runner (org.openjdk.jmh.runner)
  • Top 12 Jupyter Notebook extensions
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