use of net.jangaroo.exml.model.ConfigClassRegistry in project jangaroo-tools by CoreMedia.
the class MxmlLibraryManifestGeneratorTest method testCreateManifestFile.
@Test
public void testCreateManifestFile() throws Exception {
ExmlConfiguration exmlConfiguration = mock(ExmlConfiguration.class);
when(exmlConfiguration.getSourcePath()).thenReturn(Collections.singletonList(temporaryFolder.newFolder("out")));
ConfigClass configClass1 = mock(ConfigClass.class);
when(configClass1.getFullName()).thenReturn("foo");
when(configClass1.getType()).thenReturn(ConfigClassType.CLASS);
when(configClass1.getComponentClassName()).thenReturn("Foo");
ConfigClass configClass2 = mock(ConfigClass.class);
when(configClass2.getFullName()).thenReturn("bar");
when(configClass2.getType()).thenReturn(ConfigClassType.CLASS);
when(configClass2.getComponentClassName()).thenReturn("Bar");
ConfigClass configClass3 = mock(ConfigClass.class);
when(configClass3.getFullName()).thenReturn("comp");
when(configClass3.getType()).thenReturn(ConfigClassType.COMPONENT);
when(configClass3.getComponentClassName()).thenReturn("Comp");
ConfigClassRegistry configClassRegistry = mock(ConfigClassRegistry.class);
when(configClassRegistry.getConfig()).thenReturn(exmlConfiguration);
when(configClassRegistry.getSourceConfigClasses()).thenReturn(asList(configClass1, configClass2, configClass3));
File manifest = new MxmlLibraryManifestGenerator(configClassRegistry).createManifestFile();
assertEquals(IOUtils.toString(getClass().getResourceAsStream("/expected/manifest.xml")), readFileToString(manifest));
}
use of net.jangaroo.exml.model.ConfigClassRegistry in project jangaroo-tools by CoreMedia.
the class ExmlToMxmlTest method getConfigClassRegistry.
@Override
public ConfigClassRegistry getConfigClassRegistry() {
ConfigClassRegistry configClassRegistry = super.getConfigClassRegistry();
configClassRegistry.getConfig().setKeepExmlFiles(true);
return configClassRegistry;
}
Aggregations