From 7e0244edae5bb796dee73438b2b900f66b1ad825 Mon Sep 17 00:00:00 2001 From: Alasdair Hodge Date: Wed, 21 Dec 2011 14:10:36 +0000 Subject: [PATCH] Unit test tags as part of map <-> drive conversions --- .../cloudsigma/functions/BaseDriveToMapTest.java | 5 ++++- .../cloudsigma/functions/DriveDataToMapTest.java | 11 ++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/BaseDriveToMapTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/BaseDriveToMapTest.java index 89ec601fb6..7d42de97e8 100644 --- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/BaseDriveToMapTest.java +++ b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/BaseDriveToMapTest.java @@ -48,13 +48,16 @@ public class BaseDriveToMapTest { // .size(8589934592l)// .claimType(ClaimType.SHARED)// + .tags(ImmutableSet.of("foo", "bar", "baz"))// .readers(ImmutableSet.of("ffffffff-ffff-ffff-ffff-ffffffffffff"))// .use(ImmutableSet.of("tag1", "tag2"))// .build(); assertEquals( BASEDRIVE_TO_MAP.apply(one), ImmutableMap.builder().put("name", "Ubuntu 10.10 Server Edition Linux 64bit Preinstalled System") - .put("size", "8589934592").put("claim:type", "shared") + .put("size", "8589934592") + .put("claim:type", "shared") + .put("tags", "foo bar baz") .put("readers", "ffffffff-ffff-ffff-ffff-ffffffffffff").put("use", "tag1 tag2").build() ); diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/DriveDataToMapTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/DriveDataToMapTest.java index 2c2a49383c..7189048464 100644 --- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/DriveDataToMapTest.java +++ b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/DriveDataToMapTest.java @@ -49,14 +49,19 @@ public class DriveDataToMapTest { // .size(8589934592l)// .claimType(ClaimType.SHARED)// + .tags(ImmutableSet.of("foo", "bar", "baz"))// .readers(ImmutableSet.of("ffffffff-ffff-ffff-ffff-ffffffffffff"))// .use(ImmutableSet.of("tag1", "tag2"))// .build(); assertEquals( BASEDRIVE_TO_MAP.apply(one), - ImmutableMap.builder().put("name", "Ubuntu 10.10 Server Edition Linux 64bit Preinstalled System") - .put("size", "8589934592").put("claim:type", "shared") - .put("readers", "ffffffff-ffff-ffff-ffff-ffffffffffff").put("use", "tag1 tag2").build() + ImmutableMap.builder() + .put("name", "Ubuntu 10.10 Server Edition Linux 64bit Preinstalled System") + .put("size", "8589934592") + .put("claim:type", "shared") + .put("tags", "foo bar baz") + .put("readers", "ffffffff-ffff-ffff-ffff-ffffffffffff") + .put("use", "tag1 tag2").build() );