From bd1531460903dd10e751974a8591f15049f94afe Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Thu, 10 May 2012 19:39:22 -0700 Subject: [PATCH] fixed test expectation glitch --- ...sActiveStatusPredicateWithResultExpectTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/compute/predicates/GetImageWhenImageInZoneHasActiveStatusPredicateWithResultExpectTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/compute/predicates/GetImageWhenImageInZoneHasActiveStatusPredicateWithResultExpectTest.java index a6c52ec9bb..9e40b868a3 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/compute/predicates/GetImageWhenImageInZoneHasActiveStatusPredicateWithResultExpectTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/compute/predicates/GetImageWhenImageInZoneHasActiveStatusPredicateWithResultExpectTest.java @@ -58,8 +58,10 @@ public class GetImageWhenImageInZoneHasActiveStatusPredicateWithResultExpectTest .getInstance(GetImageWhenImageInZoneHasActiveStatusPredicateWithResult.class); ZoneAndId zoneAdnId0 = ZoneAndId.fromZoneAndId("az-1.region-a.geo-1", "13"); ZoneAndId zoneAdnId1 = ZoneAndId.fromZoneAndId("az-1.region-a.geo-1", "12"); - assertTrue(!predicate.apply(zoneAdnId1)); - assertTrue(predicate.apply(zoneAdnId0)); + ZoneAndId zoneAdnId2 = ZoneAndId.fromZoneAndId("az-1.region-a.geo-1", "15"); + assertTrue(predicate.apply(zoneAdnId0)); // ACTIVE + assertTrue(!predicate.apply(zoneAdnId1)); // SAVING + assertTrue(!predicate.apply(zoneAdnId2)); // UNRECOGNIZED assertEquals("natty-server-cloudimg-amd64", predicate.getResult().getName()); } @@ -67,14 +69,12 @@ public class GetImageWhenImageInZoneHasActiveStatusPredicateWithResultExpectTest Injector injector = requestsSendResponses(requestResponseMap); PredicateWithResult predicate = injector .getInstance(GetImageWhenImageInZoneHasActiveStatusPredicateWithResult.class); - ZoneAndId zoneAdnId0 = ZoneAndId.fromZoneAndId("az-1.region-a.geo-1", "15"); ZoneAndId zoneAdnId1 = ZoneAndId.fromZoneAndId("az-1.region-a.geo-1", "14"); ZoneAndId zoneAdnId2 = ZoneAndId.fromZoneAndId("az-1.region-a.geo-1", "11"); ZoneAndId zoneAdnId3 = ZoneAndId.fromZoneAndId("az-1.region-a.geo-1", "10"); - assertTrue(illegalStateExceptionThrown(predicate, zoneAdnId0)); - assertTrue(illegalStateExceptionThrown(predicate, zoneAdnId1)); - assertTrue(illegalStateExceptionThrown(predicate, zoneAdnId2)); - assertTrue(illegalStateExceptionThrown(predicate, zoneAdnId3)); + assertTrue(illegalStateExceptionThrown(predicate, zoneAdnId1)); // UNKNOWN + assertTrue(illegalStateExceptionThrown(predicate, zoneAdnId2)); // ERROR + assertTrue(illegalStateExceptionThrown(predicate, zoneAdnId3)); // ERROR } private boolean illegalStateExceptionThrown(PredicateWithResult predicate, ZoneAndId zoneAndId) {