use of org.erlide.engine.model.root.ErlangProjectProperties in project erlide_eclipse by erlang.
the class RebarConfiguratorTest method emptyInputShouldReturnDefaultConfig.
@Test
public void emptyInputShouldReturnDefaultConfig() {
final ErlangProjectProperties expected = new ErlangProjectProperties();
final Path _path = new Path("ebin");
expected.setOutputDir(_path);
final ErlangProjectProperties actual = configurator.decodeConfig("");
Truth.assertThat(actual).isEqualTo(expected);
}
use of org.erlide.engine.model.root.ErlangProjectProperties in project erlide_eclipse by erlang.
the class RebarConfiguratorTest method sourceDirectoriesShouldBeConfigured.
@Test
public void sourceDirectoriesShouldBeConfigured() {
final StringConcatenation _builder = new StringConcatenation();
_builder.append("{erl_opts, [{src_dirs, [\"src1\", \"src2\"]}]}.");
_builder.newLine();
final String input = _builder.toString();
final ErlangProjectProperties actual = configurator.decodeConfig(input);
final Path _path = new Path("src1");
final Path _path_1 = new Path("src2");
Truth.<IPath, Iterable<IPath>>assertThat(actual.getSourceDirs()).containsAtLeastElementsIn(Collections.<Object>unmodifiableList(CollectionLiterals.<Object>newArrayList(_path, _path_1)));
}
use of org.erlide.engine.model.root.ErlangProjectProperties in project erlide_eclipse by erlang.
the class RebarConfiguratorTest method handleComplexInput.
@Test
public void handleComplexInput() {
final StringConcatenation _builder = new StringConcatenation();
_builder.append("something.");
_builder.newLine();
_builder.append("{erl_opts, [{src_dirs, [\"src1\", \"src2\"]}]}.");
_builder.newLine();
final String input = _builder.toString();
final ErlangProjectProperties actual = configurator.decodeConfig(input);
final Path _path = new Path("src1");
final Path _path_1 = new Path("src2");
Truth.<IPath, Iterable<IPath>>assertThat(actual.getSourceDirs()).containsAtLeastElementsIn(Collections.<Object>unmodifiableList(CollectionLiterals.<Object>newArrayList(_path, _path_1)));
}
use of org.erlide.engine.model.root.ErlangProjectProperties in project erlide_eclipse by erlang.
the class RebarConfiguratorTest method includeDirectoriesShouldBeConfigured.
@Test
public void includeDirectoriesShouldBeConfigured() {
final StringConcatenation _builder = new StringConcatenation();
_builder.append("{erl_opts, [{i, \"myinclude\"}]}.");
_builder.newLine();
final String input = _builder.toString();
final ErlangProjectProperties actual = configurator.decodeConfig(input);
final IterableSubject _assertThat = Truth.<IPath, Iterable<IPath>>assertThat(actual.getIncludeDirs());
final Path _path = new Path("myinclude");
_assertThat.contains(_path);
}
Aggregations