From fd9b49873b55647cfc76b7f426b554636f141137 Mon Sep 17 00:00:00 2001 From: vijaykiran Date: Sat, 29 Oct 2011 15:56:23 +0200 Subject: [PATCH] Fixed test (assertion) failure for network domain. --- .../org/jclouds/cloudstack/domain/Network.java | 15 +++++++-------- .../features/NetworkClientLiveTest.java | 3 ++- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Network.java b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Network.java index 784e279a65..f337422c97 100644 --- a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Network.java +++ b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Network.java @@ -18,19 +18,18 @@ */ package org.jclouds.cloudstack.domain; -import static com.google.common.base.Preconditions.checkNotNull; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.ImmutableSortedSet; +import com.google.gson.annotations.SerializedName; +import javax.annotation.Nullable; import java.net.URI; import java.util.List; import java.util.Set; import java.util.SortedSet; -import javax.annotation.Nullable; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.ImmutableSortedSet; -import com.google.gson.annotations.SerializedName; +import static com.google.common.base.Preconditions.checkNotNull; /** * @@ -245,7 +244,7 @@ public class Network implements Comparable { @SerializedName("issystem") private boolean isSystem; private String netmask; - @SerializedName("networkdomain") + @SerializedName("domain") private String networkDomain; @SerializedName("networkofferingavailability") private String networkOfferingAvailability; diff --git a/sandbox-apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/NetworkClientLiveTest.java b/sandbox-apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/NetworkClientLiveTest.java index f49c4f2801..b471b9261c 100644 --- a/sandbox-apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/NetworkClientLiveTest.java +++ b/sandbox-apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/NetworkClientLiveTest.java @@ -22,6 +22,7 @@ import static com.google.common.collect.Iterables.find; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; +import java.net.URI; import java.util.NoSuchElementException; import java.util.Set; @@ -132,7 +133,7 @@ public class NetworkClientLiveTest extends BaseCloudStackClientLiveTest { assert network.getNetmask() != null : network; assert network.getGateway() != null : network; assert network.getVLAN() != null : network; - assertEquals(network.getBroadcastURI(), "vlan://" + network.getVLAN()); + assertEquals(network.getBroadcastURI(), URI.create("vlan://" + network.getVLAN())); assert network.getStartIP() != null : network; assert network.getEndIP() != null : network; break;