@Test public void testGetProvider() throws Exception { StorageOfferProvider provider = StorageOfferProviderFactory.getDefaultProvider(); assertNotNull(provider); assertTrue(provider instanceof FileStorageProvider); StorageOffer disabledOffer = provider.getStorageOffer("inactiveOffer", true); assertFalse(disabledOffer.isEnabled()); assertTrue(disabledOffer.getId().equals("inactiveOffer")); try { provider.getStorageOffer("inactiveOffer", false); fail("Expecting storage exception"); }catch(StorageNotFoundException ex){ } }
public static StorageOfferProvider getDefaultProvider() { return FS_REFERENTIAL; }
StorageOfferProviderFactory { public static StorageOfferProvider getDefaultProvider() { return FS_REFERENTIAL; } }
StorageOfferProviderFactory { public static StorageOfferProvider getDefaultProvider() { return FS_REFERENTIAL; } private  StorageOfferProviderFactory(); }
StorageOfferProviderFactory { public static StorageOfferProvider getDefaultProvider() { return FS_REFERENTIAL; } private  StorageOfferProviderFactory(); static StorageOfferProvider getDefaultProvider(); }
StorageOfferProviderFactory { public static StorageOfferProvider getDefaultProvider() { return FS_REFERENTIAL; } private  StorageOfferProviderFactory(); static StorageOfferProvider getDefaultProvider();  }