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

  • Parsing JSON documents to java classes using gson
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • IsNull (org.hamcrest.core)
    Is the value null?
  • 14 Best Plugins for Eclipse
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