You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ad...@apache.org on 2014/10/24 18:08:51 UTC

[17/21] Rename Azure HostedService -> CloudService to match documentation.

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/99633575/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListHostedServicesHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListHostedServicesHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListHostedServicesHandlerTest.java
deleted file mode 100644
index f40f3c9..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListHostedServicesHandlerTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.Collections;
-import java.util.List;
-
-import org.jclouds.azurecompute.domain.HostedService;
-import org.jclouds.azurecompute.domain.HostedService.Status;
-import org.jclouds.date.DateService;
-import org.jclouds.date.internal.SimpleDateFormatDateService;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-@Test(groups = "unit", testName = "ListHostedServicesHandlerTest")
-public class ListHostedServicesHandlerTest extends BaseHandlerTest {
-   private static final DateService DATE_SERVICE = new SimpleDateFormatDateService();
-
-   public void test() {
-      InputStream is = getClass().getResourceAsStream("/hostedservices.xml");
-      ListHostedServicesHandler handler = new ListHostedServicesHandler(new HostedServiceHandler(DATE_SERVICE));
-      List<HostedService> result = factory.create(handler).parse(is);
-
-      assertEquals(result, expected());
-   }
-
-   public static List<HostedService> expected() {
-      return ImmutableList.of( //
-            HostedService.create( //
-                  "neotys", // name
-                  "West Europe", // location
-                  null, // affinityGroup
-                  "neotys", // label
-                  "Implicitly created hosted service2012-08-06 14:55", // description
-                  Status.CREATED, // status
-                  DATE_SERVICE.iso8601SecondsDateParse("2012-08-06T14:55:17Z"), // created
-                  DATE_SERVICE.iso8601SecondsDateParse("2012-08-06T15:50:34Z"), // lastModified
-                  Collections.<String, String>emptyMap() // extendedProperties
-            ), //
-            HostedService.create( //
-                  "neotys3", // name
-                  "West Europe", // location
-                  null, // affinityGroup
-                  "neotys3", // label
-                  null, // description
-                  Status.CREATED, // status
-                  DATE_SERVICE.iso8601SecondsDateParse("2012-08-07T09:00:02Z"), // created
-                  DATE_SERVICE.iso8601SecondsDateParse("2012-08-07T09:00:02Z"), // lastModified
-                  Collections.<String, String>emptyMap() // extendedProperties
-            ));
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/99633575/azurecompute/src/test/resources/hostedservice.xml
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/resources/hostedservice.xml b/azurecompute/src/test/resources/hostedservice.xml
index bdece1b..f3619b8 100644
--- a/azurecompute/src/test/resources/hostedservice.xml
+++ b/azurecompute/src/test/resources/hostedservice.xml
@@ -2,7 +2,7 @@
     <Url>https://api/services/hostedservices/neotys</Url>
     <ServiceName>neotys</ServiceName>
     <HostedServiceProperties>
-        <Description>Implicitly created hosted service2012-08-06 14:55</Description>
+        <Description>Implicitly created cloud service2012-08-06 14:55</Description>
         <Location>West Europe</Location>
         <Label>bmVvdHlz</Label>
         <Status>Created</Status>

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/99633575/azurecompute/src/test/resources/hostedservices.xml
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/resources/hostedservices.xml b/azurecompute/src/test/resources/hostedservices.xml
index 3cee89b..817ab52 100644
--- a/azurecompute/src/test/resources/hostedservices.xml
+++ b/azurecompute/src/test/resources/hostedservices.xml
@@ -4,7 +4,7 @@
         <Url>https://api/services/hostedservices/neotys</Url>
         <ServiceName>neotys</ServiceName>
         <HostedServiceProperties>
-            <Description>Implicitly created hosted service2012-08-06 14:55</Description>
+            <Description>Implicitly created cloud service2012-08-06 14:55</Description>
             <Location>West Europe</Location>
             <Label>bmVvdHlz</Label>
             <Status>Created</Status>