Updated Branches:
  refs/heads/1.6.x 859eaca9f -> 6c8679af6

Expect exception from FilePayload.getInput

Previously the constructor threw this.  Fixes regression from ac58a70.


Project: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/commit/6c8679af
Tree: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/tree/6c8679af
Diff: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/diff/6c8679af

Branch: refs/heads/1.6.x
Commit: 6c8679af6655ec530bb1b828c90a493d90563fff
Parents: 859eaca
Author: Andrew Gaul <[email protected]>
Authored: Tue Jul 16 08:26:08 2013 -0700
Committer: Andrew Gaul <[email protected]>
Committed: Tue Jul 16 08:29:02 2013 -0700

----------------------------------------------------------------------
 .../strategy/internal/FilesystemStorageStrategyImplTest.java  | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/6c8679af/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java
----------------------------------------------------------------------
diff --git 
a/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java
 
b/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java
index 80fe343..4b0a241 100644
--- 
a/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java
+++ 
b/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java
@@ -40,6 +40,7 @@ import 
org.jclouds.filesystem.predicates.validators.internal.FilesystemContainer
 import org.jclouds.filesystem.utils.TestUtils;
 import org.jclouds.io.payloads.FilePayload;
 import org.jclouds.io.payloads.InputStreamPayload;
+import org.jclouds.util.Throwables2;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -384,10 +385,12 @@ public class FilesystemStorageStrategyImplTest {
 
    public void testWritePayloadOnFile_SourceFileDoesntExist() {
       File sourceFile = new File("asdfkjsadkfjasdlfasdflk.asdfasdfas");
+      FilePayload payload = new FilePayload(sourceFile);
       try {
-         new FilePayload(sourceFile);
-         fail("Exception not throwed");
+         payload.getInput();
+         fail("Exception not thrown");
       } catch (Exception ex) {
+         assertNotNull(Throwables2.getFirstThrowableOfType(ex, 
IOException.class));
       }
    }
 

Reply via email to