Skip to content

Commit

Permalink
fix the missing file and a few comments for list media processor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Albert Cheng committed Oct 16, 2012
1 parent 0862d5f commit 8c965a4
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,9 @@ public LocatorInfo createLocator(String accessPolicyId, String assetId, LocatorT
}
}

/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#listMediaProcessors()
*/
@Override
public ListMediaProcessorsResult listMediaProcessors() throws ServiceException {
try {
Expand All @@ -434,6 +437,9 @@ public ListMediaProcessorsResult listMediaProcessors() throws ServiceException {
}
}

/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#listMediaProcessors(com.microsoft.windowsazure.services.media.models.ListMediaProcessorsOptions)
*/
@Override
public ListMediaProcessorsResult listMediaProcessors(ListMediaProcessorsOptions listMediaProcessorsOptions)
throws ServiceException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import com.sun.jersey.api.client.UniformInterfaceException;
import com.sun.jersey.api.client.WebResource;

// TODO: Auto-generated Javadoc
/**
* The Class MediaRestProxy.
*/
Expand Down Expand Up @@ -356,6 +357,9 @@ public List<AccessPolicyInfo> listAccessPolicies(ListAccessPolicyOptions options
});
}

/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#createLocator(java.lang.String, java.lang.String, com.microsoft.windowsazure.services.media.models.LocatorType)
*/
@Override
public LocatorInfo createLocator(String accessPolicyId, String assetId, LocatorType locatorType) {
return this.createLocator(accessPolicyId, assetId, locatorType, null);
Expand Down Expand Up @@ -451,11 +455,17 @@ public void updateLocator(String locatorId, UpdateLocatorOptions updateLocatorOp
PipelineHelpers.ThrowIfNotSuccess(clientResponse);
}

/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#listMediaProcessors()
*/
@Override
public ListMediaProcessorsResult listMediaProcessors() {
return this.listMediaProcessors(null);
}

/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#listMediaProcessors(com.microsoft.windowsazure.services.media.models.ListMediaProcessorsOptions)
*/
@Override
public ListMediaProcessorsResult listMediaProcessors(ListMediaProcessorsOptions listMediaProcessorsOptions) {
WebResource resource = getResource("MediaProcessors");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* Copyright 2012 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.microsoft.windowsazure.services.media.models;

import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.List;

import org.junit.Test;

public class ListMediaProcessorsResultTest {

@Test
public void createListMediaProcessorsResultSuccess() {
// Arrange

// Act
ListMediaProcessorsResult listMediaProcessorsResult = new ListMediaProcessorsResult();

// Assert
assertNotNull(listMediaProcessorsResult);

}

@Test
public void getSetMediaProcessorInfos() {
// Arrange
ListMediaProcessorsResult listMediaProcessorsResult = new ListMediaProcessorsResult();
List<MediaProcessorInfo> expectedMediaProcessorInfos = new ArrayList<MediaProcessorInfo>();

// Act
List<MediaProcessorInfo> actualMediaProcessorInfos = listMediaProcessorsResult.setMediaProcessorInfos(
expectedMediaProcessorInfos).getMediaProcessorInfos();

// Assert
assertEquals(expectedMediaProcessorInfos, actualMediaProcessorInfos);

}

}

0 comments on commit 8c965a4

Please sign in to comment.