public void testGetSettingsLocation() throws Exception { assertEquals( bundleCreator.getClass().getPackage().getName().replace('.', '/') + "/ConfigurableBundleCreatorTestsTest$1-bundle.properties", bundleCreator.getSettingsLocation()); }
public void testDefaultJarSettings() throws Exception { Properties defaultSettings = bundleCreator.getSettings(); Field field = ReflectionUtils.findField( AbstractConfigurableBundleCreatorTests.class, "jarSettings", Properties.class); ReflectionUtils.makeAccessible(field); ReflectionUtils.setField(field, null, defaultSettings); assertNotNull(defaultSettings); assertNotNull(bundleCreator.getRootPath()); assertNotNull(bundleCreator.getBundleContentPattern()); assertNotNull(bundleCreator.getManifestLocation()); }
public void testPropertiesLoading() throws Exception { Properties testSettings = bundleCreator.getSettings(); Properties props = new Properties(); props.load( new ClassPathResource( "org/eclipse/gemini/blueprint/test/ConfigurableBundleCreatorTestsTest$1-bundle.properties") .getInputStream()); assertEquals( props.getProperty(AbstractConfigurableBundleCreatorTests.INCLUDE_PATTERNS), testSettings.getProperty(AbstractConfigurableBundleCreatorTests.INCLUDE_PATTERNS)); assertEquals( props.getProperty(AbstractConfigurableBundleCreatorTests.MANIFEST), testSettings.getProperty(AbstractConfigurableBundleCreatorTests.MANIFEST)); }