Unit test tags as part of map <-> drive conversions

This commit is contained in:
Alasdair Hodge 2011-12-21 14:10:36 +00:00
parent 5dedb8b81c
commit 7e0244edae
2 changed files with 12 additions and 4 deletions

View File

@ -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()
);

View File

@ -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()
);