better exception message

remoced unused import

removed hokey test
This commit is contained in:
Adrian Cole 2012-01-14 21:09:49 -08:00
parent c9f980e59e
commit 9791a51039
3 changed files with 6 additions and 6 deletions

View File

@ -51,7 +51,8 @@ public class ReturnCredentialsBoundToImage implements PopulateDefaultLoginCreden
@Override @Override
public LoginCredentials apply(Object resourceToAuthenticate) { public LoginCredentials apply(Object resourceToAuthenticate) {
checkState(resourceToAuthenticate instanceof Image, "this is only valid for images"); checkState(resourceToAuthenticate instanceof Image, "this is only valid for images, not %s",
resourceToAuthenticate.getClass().getSimpleName());
if (creds != null) if (creds != null)
return creds; return creds;
Image image = Image.class.cast(resourceToAuthenticate); Image image = Image.class.cast(resourceToAuthenticate);

View File

@ -37,7 +37,6 @@ import org.testng.annotations.Test;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
public class Suppliers2Test { public class Suppliers2Test {

View File

@ -190,14 +190,14 @@ public class AWSAMIClientLiveTest extends BaseVersionedServiceLiveTest {
// TODO client.resetLaunchPermissionsOnImageInRegion(null, imageId); // TODO client.resetLaunchPermissionsOnImageInRegion(null, imageId);
} }
@Test(expectedExceptions = AuthorizationException.class) @Test(enabled = false)
public void testGetLaunchPermissionForImage() { public void testGetLaunchPermissionForImage() {
System.out.println(client.getLaunchPermissionForImageInRegion(null, imageId)); // TODO System.out.println(client.getLaunchPermissionForImageInRegion(null, imageId));
} }
@Test(expectedExceptions = AuthorizationException.class) @Test(enabled = false)
public void testGetProductCodesForImage() { public void testGetProductCodesForImage() {
System.out.println(client.getProductCodesForImageInRegion(null, imageId)); // TODO System.out.println(client.getProductCodesForImageInRegion(null, imageId));
} }
@Test(enabled = false) @Test(enabled = false)