Permalink
Browse files

code review feedback.

  • Loading branch information...
1 parent a2e7de4 commit a09614c75a815f61373b6c1db8b88c7900c42c55 Albert Cheng committed Dec 14, 2012
@@ -53,10 +53,13 @@
import com.microsoft.windowsazure.services.media.models.ContentKey;
import com.microsoft.windowsazure.services.media.models.ContentKeyInfo;
import com.microsoft.windowsazure.services.media.models.ContentKeyType;
+import com.microsoft.windowsazure.services.media.models.Job;
+import com.microsoft.windowsazure.services.media.models.JobInfo;
import com.microsoft.windowsazure.services.media.models.Locator;
import com.microsoft.windowsazure.services.media.models.LocatorInfo;
import com.microsoft.windowsazure.services.media.models.LocatorType;
import com.microsoft.windowsazure.services.media.models.ProtectionKey;
+import com.microsoft.windowsazure.services.media.models.Task;
public class EncryptionIntegrationTest extends IntegrationTestBase {
@@ -116,13 +119,18 @@ public void uploadAesProtectedAssetAndDownloadSuccess() throws Exception {
AssetFileInfo assetFileInfo = uploadEncryptedAssetFile(assetInfo, locatorInfo, contentKeyInfo,
"uploadAesProtectedAssetSuccess", encryptedContent);
- // executeDecodingJob(assetInfo);
+ decodeAsset(assetInfo);
// Assert
// verify the file downloaded is identical to the one that is uploaded.
}
+ private void decodeAsset(AssetInfo assetInfo) throws ServiceException {
+ JobInfo jobInfo = service.create(Job.create(service.getRestServiceUri()).addInputMediaAsset(assetInfo.getId())
+ .addTaskCreator(Task.create()));
+ }
+
private void linkContentKey(AssetInfo assetInfo, ContentKeyInfo contentKeyInfo) throws ServiceException {
URI contentKeyUri = createContentKeyUri(service.getRestServiceUri(), contentKeyInfo.getId());
service.action(Asset.linkContentKey(assetInfo.getId(), contentKeyUri));
@@ -188,9 +196,4 @@ private ContentKeyInfo createContentKey(byte[] aesKey, ContentKeyType contentKey
return contentKeyInfo;
}
- private AssetInfo createAsset(String string) {
- // TODO Auto-generated method stub
- return null;
- }
-
}

0 comments on commit a09614c

Please sign in to comment.