use of org.eclipse.epp.internal.mpc.core.model.Featured in project epp.mpc by eclipse.
the class UnmarshallerTest method featured.
@Test
public void featured() throws IOException, UnmarshalException {
// from http://www.eclipseplugincentral.net/api/v2/featured
Object model = processResource("resources/featured.xml");
assertNotNull(model);
assertTrue(model instanceof Marketplace);
Marketplace marketplace = (Marketplace) model;
Featured featured = marketplace.getFeatured();
assertNotNull(featured);
assertEquals(Integer.valueOf(6), featured.getCount());
assertEquals(6, featured.getNode().size());
INode node = featured.getNode().get(0);
assertEquals("248", node.getId());
assertEquals("eUML2 free edition", node.getName());
assertEquals("http://www.eclipseplugincentral.net/content/euml2-free-edition", node.getUrl());
assertEquals("resource", node.getType());
ICategories categories = node.getCategories();
assertNotNull(categories);
assertEquals(1, categories.getCategory().size());
ICategory category = categories.getCategory().get(0);
assertEquals("19", category.getId());
assertEquals("UML", category.getName());
assertEquals("http://www.eclipseplugincentral.net/taxonomy/term/19", category.getUrl());
assertEquals("Yves YANG", node.getOwner());
assertEquals(Integer.valueOf(0), node.getFavorited());
assertNotNull(node.getBody());
// bug 303149 assertTrue(node.getBody().startsWith("<P><STRONG>eUML2 for Java<"));
// bug 303149 assertTrue(node.getBody().endsWith("</LI></UL>"));
assertTrue(node.getFoundationmember());
assertEquals("http://www.soyatec.com/", node.getHomepageurl());
assertEquals("http://www.soyatec.com/euml2/images/product_euml2_110x80.png", node.getImage());
assertEquals("3.4", node.getVersion());
assertEquals("Free for non-commercial use", node.getLicense());
assertEquals("Soyatec", node.getCompanyname());
assertEquals("Mature", node.getStatus());
assertEquals("3.4.x/3.5.x", node.getEclipseversion());
assertEquals("http://www.soyatec.com/forum", node.getSupporturl());
assertEquals("http://www.soyatec.com/update", node.getUpdateurl());
}
Aggregations