Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Code review feedback. Removed todo, removed getLinks method.

  • Loading branch information...
commit c66d567112478f509105561c4cc6b55cbcee5186 1 parent 9d5b720
@christav christav authored
View
19 microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntity.java
@@ -17,8 +17,6 @@
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.List;
import javax.xml.bind.JAXBElement;
@@ -110,23 +108,6 @@ public boolean hasLink(String rel) {
return this.<U> getLink(Constants.ODATA_DATA_NS + "/related/" + relationName);
}
- /**
- * Return the links from this entry
- *
- * @return List of the links.
- */
- @SuppressWarnings("rawtypes")
- public List<LinkInfo> getLinks() {
- ArrayList<LinkInfo> links = new ArrayList<LinkInfo>();
- for (Object child : entry.getEntryChildren()) {
- LinkType link = LinkFromChild(child);
- if (link != null) {
- links.add(new LinkInfo(link));
- }
- }
- return links;
- }
-
@SuppressWarnings("rawtypes")
private static LinkType LinkFromChild(Object child) {
if (child instanceof JAXBElement) {
View
3  microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/AssetInfo.java
@@ -130,12 +130,11 @@ public AssetOption getOptions() {
}
/**
- * Get a link to the asset's locators
+ * Get a link to this asset's parents
*
* @return the link
*/
public LinkInfo<AssetInfo> getParentAssetsLink() {
- // TODO: NEEDS TESTS once we figure out how to create assets with parents
return this.<AssetInfo> getRelationLink("ParentAssets");
}
}
View
11 ...-azure-api/src/test/java/com/microsoft/windowsazure/services/media/implementation/LinkRetrievalTest.java
@@ -17,8 +17,6 @@
import static org.junit.Assert.*;
-import java.util.List;
-
import javax.xml.bind.JAXBElement;
import javax.xml.namespace.QName;
@@ -96,15 +94,6 @@ public void getNullWhenLinkIsntThere() {
assertNull(info.getLink("noSuchLink"));
}
- @Test
- public void getLinksReturnsTwoExpectedLinksInOrder() {
- List<LinkInfo> links = info.getLinks();
-
- assertEquals(2, links.size());
- assertLinksEqual(link1, links.get(0));
- assertLinksEqual(link2, links.get(1));
- }
-
private static void assertLinksEqual(LinkType expected, LinkInfo actual) {
assertEquals(expected.getHref(), actual.getHref());
}
Please sign in to comment.
Something went wrong with that request. Please try again.