Search in sources :

Example 1 with FileProjectConfigurator

use of org.erlide.engine.model.root.FileProjectConfigurator in project erlide_eclipse by erlang.

the class RebarProjectConfigurationTest method configCanBeParsed.

@Override
@Test
public void configCanBeParsed() throws CoreException {
    project.setConfigType(ProjectConfigType.REBAR);
    project.storeAllProperties();
    setFileContent(ProjectConfigType.REBAR.getConfigName(), "");
    final IProjectConfigurator persister = ProjectConfiguratorFactory.getDefault().getConfig(project.getConfigType(), project);
    final ProjectConfigurationSerializer configurator = ((FileProjectConfigurator) persister).getSerializer();
    final ErlangProjectProperties expected = new ErlangProjectProperties();
    expected.setOutputDir(new Path("ebin"));
    final ErlangProjectProperties actual = configurator.decodeConfig("");
    assertThat(actual).isEqualTo(expected);
}
Also used : IPath(org.eclipse.core.runtime.IPath) Path(org.eclipse.core.runtime.Path) ProjectConfigurationSerializer(org.erlide.engine.model.root.ProjectConfigurationSerializer) IProjectConfigurator(org.erlide.engine.model.root.IProjectConfigurator) ErlangProjectProperties(org.erlide.engine.model.root.ErlangProjectProperties) FileProjectConfigurator(org.erlide.engine.model.root.FileProjectConfigurator) Test(org.junit.Test)

Aggregations

IPath (org.eclipse.core.runtime.IPath)1 Path (org.eclipse.core.runtime.Path)1 ErlangProjectProperties (org.erlide.engine.model.root.ErlangProjectProperties)1 FileProjectConfigurator (org.erlide.engine.model.root.FileProjectConfigurator)1 IProjectConfigurator (org.erlide.engine.model.root.IProjectConfigurator)1 ProjectConfigurationSerializer (org.erlide.engine.model.root.ProjectConfigurationSerializer)1 Test (org.junit.Test)1