andreaturli requested changes on this pull request.

thanks for the great start @btrishkin 

Some initial thoughts on you PR, could you please have a look at them?

> +import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Set;
+
+import static org.easymock.EasyMock.createNiceMock;
+import static org.easymock.EasyMock.expect;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+
+@Test(groups = "unit", testName = "DatacenterToLocationTest")
+public class DatacenterToLocationTest {

In jclouds we test those kind of functions already using a slightly different 
pattern - see 
https://github.com/jclouds/jclouds/blob/master/providers/digitalocean2/src/test/java/org/jclouds/digitalocean2/compute/functions/RegionToLocationTest.java
 for a great example 

> +
+      parentLocations = ImmutableSet.of(new 
LocationBuilder().scope(LocationScope.PROVIDER).id("parentId")
+            .iso3166Codes(new ArrayList<String>()).metadata(new 
HashMap()).description("parentDescription").build());
+
+      datacenter = Datacenter.builder().displayName("US - West").city("Santa 
Clara").state("California").country("US")
+            
.vpnUrl("https://na3.cloud-vpn.net";).ftpsHost("ftps-na.cloud-vpn.net").networking(Networking.builder()
+                  
.properties(Collections.singletonList(Property.create("MAX_SERVER_TO_VIP_CONNECTIONS",
 "20")))
+                  
.type("1").maintenanceStatus("NORMAL").build()).hypervisor(hypervisor).backup(
+                  
Backup.builder().maintenanceStatus("NORMAL").type("COMMVAULT")
+                        
.properties(Collections.<Property>emptyList()).build()).consoleAccess(
+                  
ConsoleAccess.builder().properties(Collections.<Property>emptyList()).maintenanceStatus("NORMAL")
+                        .build()).monitoring(
+                  
Monitoring.builder().maintenanceStatus("NORMAL").properties(Collections.<Property>emptyList())
+                        .build()).type("MCP 1.0").id("NA3").build();
+
+      justProvider = createNiceMock(JustProvider.class);

do you need to mock the `justProvider` or you can maybe re-use the pattern used 
at 
https://github.com/jclouds/jclouds/blob/master/providers/digitalocean2/src/test/java/org/jclouds/digitalocean2/compute/functions/RegionToLocationTest.java#L41-L42
 ?

> +import org.jclouds.dimensiondata.cloudcontrol.domain.Server;
+import org.jclouds.dimensiondata.cloudcontrol.domain.State;
+import 
org.jclouds.dimensiondata.cloudcontrol.domain.internal.ServerWithExternalIp;
+import org.jclouds.dimensiondata.cloudcontrol.features.NetworkApi;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import java.util.ArrayList;
+import java.util.Date;
+
+import static org.easymock.EasyMock.expect;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertNull;
+
+@Test(groups = "unit", testName = "DatacenterToLocationTest")

I think it is ` testName = ServerToServerWithExternalIpTest`

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/423#pullrequestreview-80234663

Reply via email to