Tabnine Logo
IterableWithMarker.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
org.jclouds.collect.IterableWithMarker

Best Java code snippets using org.jclouds.collect.IterableWithMarker.toString (Showing top 20 results out of 315)

origin: jclouds/legacy-jclouds

public void test() {
 InputStream is = getClass().getResourceAsStream("/hosted_zones.xml");
 IterableWithMarker<HostedZone> expected = expected();
 ListHostedZonesResponseHandler handler = injector.getInstance(ListHostedZonesResponseHandler.class);
 IterableWithMarker<HostedZone> result = factory.create(handler).parse(is);
 assertEquals(result.toString(), expected.toString());
}
origin: apache/jclouds

public void test() {
 InputStream is = getClass().getResourceAsStream("/hosted_zones.xml");
 IterableWithMarker<HostedZone> expected = expected();
 ListHostedZonesResponseHandler handler = injector.getInstance(ListHostedZonesResponseHandler.class);
 IterableWithMarker<HostedZone> result = factory.create(handler).parse(is);
 assertEquals(result.toString(), expected.toString());
}
origin: jclouds/legacy-jclouds

/**
* Tests parsing all possible XML elements that could be encountered by {@link ListAlarmsResponseHandler}.
*
* @throws Exception if something goes wrong
*/
public void testParseFullResponse() throws Exception {
 IterableWithMarker<Alarm> metricAlarms =
    factory.create(injector.getInstance(ListAlarmsResponseHandler.class))
        .parse(getClass().getResourceAsStream("/DescribeAlarmsResponse.xml"));
 assertEquals(metricAlarms.toString(), expected().toString());
 assertFalse(metricAlarms.nextMarker().isPresent());
}
origin: jclouds/legacy-jclouds

/**
* Tests parsing all possible XML elements that could be encountered by {@link ListAlarmHistoryResponseHandler}.
*
* @throws Exception if something goes wrong
*/
public void testParseFullResponse() throws Exception {
 IterableWithMarker<AlarmHistoryItem> alarmHistoryItems =
    factory.create(injector.getInstance(ListAlarmHistoryResponseHandler.class))
        .parse(getClass().getResourceAsStream("/DescribeAlarmHistoryResponse.xml"));
 assertEquals(alarmHistoryItems.toString(), expected().toString());
 assertFalse(alarmHistoryItems.nextMarker().isPresent());
}
origin: apache/jclouds

/**
* Tests parsing all possible XML elements that could be encountered by {@link ListAlarmHistoryResponseHandler}.
*
* @throws Exception if something goes wrong
*/
public void testParseFullResponse() throws Exception {
 IterableWithMarker<AlarmHistoryItem> alarmHistoryItems =
    factory.create(injector.getInstance(ListAlarmHistoryResponseHandler.class))
        .parse(getClass().getResourceAsStream("/DescribeAlarmHistoryResponse.xml"));
 assertEquals(alarmHistoryItems.toString(), expected().toString());
 assertFalse(alarmHistoryItems.nextMarker().isPresent());
}
origin: apache/jclouds

/**
* Tests parsing all possible XML elements that could be encountered by {@link ListAlarmsResponseHandler}.
*
* @throws Exception if something goes wrong
*/
public void testParseFullResponse() throws Exception {
 IterableWithMarker<Alarm> metricAlarms =
    factory.create(injector.getInstance(ListAlarmsResponseHandler.class))
        .parse(getClass().getResourceAsStream("/DescribeAlarmsResponse.xml"));
 assertEquals(metricAlarms.toString(), expected().toString());
 assertFalse(metricAlarms.nextMarker().isPresent());
}
origin: jclouds/legacy-jclouds

public void testListAtWhenResponseIs2xx() {
 Route53Api apiWhenAtExist = requestSendsResponse(listAt, listResponse);
 assertEquals(apiWhenAtExist.getHostedZoneApi().listAt("Z333333YYYYYYY").toString(),
    new ListHostedZonesResponseTest().expected().toString());
}
origin: apache/jclouds

public void testListAtWhenResponseIs2xx() {
 Route53Api apiWhenAtExist = requestSendsResponse(listAt, listResponse);
 assertEquals(apiWhenAtExist.getHostedZoneApi().listAt("Z333333YYYYYYY").toString(),
    new ListHostedZonesResponseTest().expected().toString());
}
origin: jclouds/legacy-jclouds

public void testListWhenResponseIs2xx() {
 Route53Api success = requestSendsResponse(list, listResponse);
 assertEquals(success.getHostedZoneApi().list().get(0).toString(), new ListHostedZonesResponseTest().expected()
    .toString());
}
origin: apache/jclouds

public void testListWhenResponseIs2xx() {
 Route53Api success = requestSendsResponse(list, listResponse);
 assertEquals(success.getHostedZoneApi().list().get(0).toString(), new ListHostedZonesResponseTest().expected()
    .toString());
}
origin: jclouds/legacy-jclouds

   );
assertEquals(new ListAlarmsResponseHandlerTest().expected().toString(),
       cloudWatchApi.getAlarmApiForRegion(null)
             .list(new ListAlarmsOptions()
                    .maxRecords(maxRecords)
                    .state(state)
             ).get(0).toString());
origin: jclouds/legacy-jclouds

public void testListWhenResponseIs2xx() {
 Route53Api success = requestSendsResponse(list, listResponse);
 assertEquals(success.getResourceRecordSetApiForHostedZone("Z1PA6795UKMFR9").list().get(0).toString(),
    new ListResourceRecordSetsResponseTest().expected().toString());
}
origin: apache/jclouds

public void testDescribeAlarmHistory() throws Exception {
 String alarmName = "TestAlarmName";
 HistoryItemType historyItemType = HistoryItemType.ACTION;
 int maxRecords = 10;
 String endDateStr = "2013-01-02T00:00:00.000Z";
 String startDateStr = "2013-01-01T00:00:00.000Z";
 CloudWatchApi cloudWatchApi = requestSendsResponse(
    alarmRequest(ImmutableMap.<String, String> builder()
                 .put("Action", "DescribeAlarmHistory")
                 .put("AlarmName", alarmName)
                 .put("EndDate", "2013-01-02T00%3A00%3A00.000Z")
                 .put("HistoryItemType", historyItemType.toString())
                 .put("MaxRecords", Integer.toString(maxRecords))
                 .put("StartDate", "2013-01-01T00%3A00%3A00.000Z")
                 .put("Signature", "O2u9yIQvCuVpKdUeUDJcswri0YD0sD4%2B/SR5TtYbPeQ%3D")
                 .build()),
    HttpResponse.builder()
          .statusCode(200)
          .payload(payloadFromResourceWithContentType("/DescribeAlarmHistoryResponse.xml", "text/xml"))
          .build());
 assertEquals(new ListAlarmHistoryResponseHandlerTest().expected().toString(),
        cloudWatchApi.getAlarmApiForRegion(null)
              .listHistory(new ListAlarmHistoryOptions()
                        .alarmName("TestAlarmName")
                        .endDate(dateService.iso8601DateParse(endDateStr))
                        .historyItemType(HistoryItemType.ACTION)
                        .maxRecords(maxRecords)
                        .startDate(dateService.iso8601DateParse(startDateStr))
              ).get(0).toString());
}
origin: apache/jclouds

public void testListWhenResponseIs2xx() {
 Route53Api success = requestSendsResponse(list, listResponse);
 assertEquals(success.getResourceRecordSetApiForHostedZone("Z1PA6795UKMFR9").list().get(0).toString(),
    new ListResourceRecordSetsResponseTest().expected().toString());
}
origin: jclouds/legacy-jclouds

public void testDescribeAlarmHistory() throws Exception {
 String alarmName = "TestAlarmName";
 HistoryItemType historyItemType = HistoryItemType.ACTION;
 int maxRecords = 10;
 String endDateStr = "2013-01-02T00:00:00.000Z";
 String startDateStr = "2013-01-01T00:00:00.000Z";
 CloudWatchApi cloudWatchApi = requestSendsResponse(
    alarmRequest(ImmutableMap.<String, String> builder()
                 .put("Action", "DescribeAlarmHistory")
                 .put("AlarmName", alarmName)
                 .put("EndDate", "2013-01-02T00%3A00%3A00.000Z")
                 .put("HistoryItemType", historyItemType.toString())
                 .put("MaxRecords", Integer.toString(maxRecords))
                 .put("StartDate", "2013-01-01T00%3A00%3A00.000Z")
                 .put("Signature", "O2u9yIQvCuVpKdUeUDJcswri0YD0sD4%2B/SR5TtYbPeQ%3D")
                 .build()),
    HttpResponse.builder()
          .statusCode(200)
          .payload(payloadFromResourceWithContentType("/DescribeAlarmHistoryResponse.xml", "text/xml"))
          .build());
 assertEquals(new ListAlarmHistoryResponseHandlerTest().expected().toString(),
        cloudWatchApi.getAlarmApiForRegion(null)
              .listHistory(new ListAlarmHistoryOptions()
                        .alarmName("TestAlarmName")
                        .endDate(dateService.iso8601DateParse(endDateStr))
                        .historyItemType(HistoryItemType.ACTION)
                        .maxRecords(maxRecords)
                        .startDate(dateService.iso8601DateParse(startDateStr))
              ).get(0).toString());
}
origin: apache/jclouds

public void testList2PagesWhenResponseIs2xx() {
 HttpResponse noMore = HttpResponse.builder().statusCode(OK.getStatusCode())
    .payload(payloadFromStringWithContentType("<ListHostedZonesResponse />", "text/xml")).build();
 Route53Api success = requestsSendResponses(list, listResponse, listAt, noMore);
 assertEquals(success.getHostedZoneApi().list().concat().toString(), new ListHostedZonesResponseTest().expected()
    .toString());
}
origin: jclouds/legacy-jclouds

public void testListMetricsWhenResponseIs2xx() throws Exception {
 HttpResponse listMetricsResponse = HttpResponse.builder().statusCode(200)
    .payload(payloadFromResourceWithContentType("/list_metrics.xml", "text/xml")).build();
 CloudWatchApi apiWhenMetricsExist = requestSendsResponse(
    listMetrics, listMetricsResponse);
 assertEquals(apiWhenMetricsExist.getMetricApiForRegion(null).list().get(0).toString(),
    "[Metric{namespace=AWS/EC2, metricName=CPUUtilization, dimension=[Dimension{name=InstanceId, value=i-689fcf0f}]}]");
}
origin: jclouds/legacy-jclouds

public void testList2PagesWhenResponseIs2xx() {
 HttpResponse noMore = HttpResponse.builder().statusCode(OK.getStatusCode())
    .payload(payloadFromStringWithContentType("<ListHostedZonesResponse />", "text/xml")).build();
 Route53Api success = requestsSendResponses(list, listResponse, listAt, noMore);
 assertEquals(success.getHostedZoneApi().list().concat().toString(), new ListHostedZonesResponseTest().expected()
    .toString());
}
origin: apache/jclouds

public void testListMetricsWhenResponseIs2xx() throws Exception {
 HttpResponse listMetricsResponse = HttpResponse.builder().statusCode(200)
    .payload(payloadFromResourceWithContentType("/list_metrics.xml", "text/xml")).build();
 CloudWatchApi apiWhenMetricsExist = requestSendsResponse(
    listMetrics, listMetricsResponse);
 assertEquals(apiWhenMetricsExist.getMetricApiForRegion(null).list().get(0).toString(),
    "[Metric{namespace=AWS/EC2, metricName=CPUUtilization, dimension=[Dimension{name=InstanceId, value=i-689fcf0f}]}]");
}
origin: jclouds/legacy-jclouds

                .metricName(EC2Constants.MetricName.CPU_UTILIZATION)
                .namespace("SOMENEXTTOKEN")
                .afterMarker(Namespaces.EC2)).toString(),
"[Metric{namespace=AWS/EC2, metricName=CPUUtilization, dimension=[Dimension{name=InstanceId, value=i-689fcf0f}]}]");
org.jclouds.collectIterableWithMarkertoString

Popular methods of IterableWithMarker

  • nextMarker
    If there is a next marker, then the set is incomplete and you should issue another command to retrie
  • iterator
  • toSet
  • allMatch
  • isEmpty
  • size
  • first

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • getSupportFragmentManager (FragmentActivity)
  • getContentResolver (Context)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • From CI to AI: The AI layer in your organization
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