Search in sources :

Example 6 with MarketplaceInfo

use of org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceInfo in project epp.mpc by eclipse.

the class MarketplaceInfoSerializationTest method loadEmpty.

@Test
public void loadEmpty() throws Exception {
    createEmptyRegistryFile(getUserHomeRegistryFile());
    MarketplaceInfo loaded = loadMarketplaceInfo();
    assertNull(loaded);
}
Also used : MarketplaceInfo(org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceInfo) Test(org.junit.Test)

Example 7 with MarketplaceInfo

use of org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceInfo in project epp.mpc by eclipse.

the class MarketplaceInfoSerializationTest method load.

@Test
public void load() throws Exception {
    File registryFile = getUserHomeRegistryFile();
    copyRegistryFile(registryFile, 100);
    MarketplaceInfo loaded = loadMarketplaceInfo();
    assertFalse(loaded.getIuToNodeKey().isEmpty());
    assertFalse(loaded.getNodeKeyToIU().isEmpty());
    MarketplaceNodeCatalogItem item = MarketplaceInfoTest.createTestItem();
    catalogRegistry.map(item.getMarketplaceUrl(), item.getData());
    assertEquals(catalogRegistry.getIuToNodeKey(), loaded.getIuToNodeKey());
    assertEquals(catalogRegistry.getNodeKeyToIU(), loaded.getNodeKeyToIU());
}
Also used : MarketplaceInfo(org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceInfo) File(java.io.File) MarketplaceNodeCatalogItem(org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceNodeCatalogItem) Test(org.junit.Test)

Example 8 with MarketplaceInfo

use of org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceInfo in project epp.mpc by eclipse.

the class MarketplaceInfoTest method before.

@Before
public void before() throws Exception {
    catalogRegistry = new MarketplaceInfo();
    item = createTestItem();
}
Also used : MarketplaceInfo(org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceInfo) Before(org.junit.Before)

Aggregations

MarketplaceInfo (org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceInfo)8 Test (org.junit.Test)6 File (java.io.File)3 MarketplaceNodeCatalogItem (org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceNodeCatalogItem)2 FileOutputStream (java.io.FileOutputStream)1 Before (org.junit.Before)1