More thorough testing of tags/affintity interaction

This commit is contained in:
Alasdair Hodge 2011-12-21 13:51:23 +00:00
parent 5f63768d4d
commit 422bf8371a
1 changed files with 16 additions and 2 deletions

View File

@ -101,17 +101,31 @@ public class CloneDriveOptionsTest {
}
@Test
public void testHddAffinityWithTags() {
public void testHddAffinityBeforeTags() {
CloneDriveOptions options = new CloneDriveOptions().affinity(AffinityType.HDD);
options.tags("foo", "bar", "baz");
assertEquals(options.getOptions().get("tags"), "foo bar baz");
}
@Test
public void testSsdAffinityWithTags() {
public void testSsdAffinityBeforeTags() {
CloneDriveOptions options = new CloneDriveOptions().affinity(AffinityType.SSD);
options.tags("foo", "bar", "baz");
assertEquals(options.getOptions().get("tags"), "foo bar baz affinity:ssd");
}
@Test
public void testHddAffinityAfterTags() {
CloneDriveOptions options = new CloneDriveOptions().tags("foo", "bar", "baz");
options.affinity(AffinityType.HDD);
assertEquals(options.getOptions().get("tags"), "foo bar baz");
}
@Test
public void testSsdAffinityAfterTags() {
CloneDriveOptions options = new CloneDriveOptions().tags("foo", "bar", "baz");
options.affinity(AffinityType.SSD);
assertEquals(options.getOptions().get("tags"), "foo bar baz affinity:ssd");
}
}