use of org.eclipse.xtext.xtext.wizard.TestProjectDescriptor in project xtext-core by eclipse.
the class WizardConfigurationTest method allJavaProjects.
public List<? extends ProjectDescriptor> allJavaProjects() {
RuntimeProjectDescriptor _runtimeProject = this.config.getRuntimeProject();
TestProjectDescriptor _testProject = this.config.getRuntimeProject().getTestProject();
UiProjectDescriptor _uiProject = this.config.getUiProject();
TestProjectDescriptor _testProject_1 = this.config.getUiProject().getTestProject();
IdeProjectDescriptor _ideProject = this.config.getIdeProject();
IntellijProjectDescriptor _intellijProject = this.config.getIntellijProject();
WebProjectDescriptor _webProject = this.config.getWebProject();
return Collections.<ProjectDescriptor>unmodifiableList(CollectionLiterals.<ProjectDescriptor>newArrayList(_runtimeProject, _testProject, _uiProject, _testProject_1, _ideProject, _intellijProject, _webProject));
}
use of org.eclipse.xtext.xtext.wizard.TestProjectDescriptor in project xtext-core by eclipse.
the class WizardConfigurationTest method inlinedTestProjectsAddTheirDependenciesToTheMainProject.
@Test
public void inlinedTestProjectsAddTheirDependenciesToTheMainProject() {
TestProjectDescriptor _testProject = this.config.getRuntimeProject().getTestProject();
_testProject.setEnabled(true);
this.config.setSourceLayout(SourceLayout.MAVEN);
final Consumer<ExternalDependency> _function = (ExternalDependency testDependency) -> {
final Function1<ExternalDependency, Boolean> _function_1 = (ExternalDependency it) -> {
return Boolean.valueOf(((Objects.equal(it.getMaven().getArtifactId(), testDependency.getMaven().getArtifactId()) && Objects.equal(it.getP2().getBundleId(), testDependency.getP2().getBundleId())) && Objects.equal(it.getP2().getPackages(), testDependency.getP2().getPackages())));
};
Assert.assertTrue(IterableExtensions.<ExternalDependency>exists(this.config.getRuntimeProject().getExternalDependencies(), _function_1));
};
this.config.getRuntimeProject().getTestProject().getExternalDependencies().forEach(_function);
}
use of org.eclipse.xtext.xtext.wizard.TestProjectDescriptor in project xtext-core by eclipse.
the class WizardConfigurationTest method testProjectIsPluginProjectWhenRuntimeProjectIsPluginProject.
@Test
public void testProjectIsPluginProjectWhenRuntimeProjectIsPluginProject() {
TestProjectDescriptor _testProject = this.config.getRuntimeProject().getTestProject();
_testProject.setEnabled(true);
Assert.assertTrue(this.config.getRuntimeProject().getTestProject().isEclipsePluginProject());
}
use of org.eclipse.xtext.xtext.wizard.TestProjectDescriptor in project xtext-core by eclipse.
the class WizardConfigurationTest method tychoDoesNotFailOnMissingTests.
@Test
public void tychoDoesNotFailOnMissingTests() {
this.config.setPreferredBuildSystem(BuildSystem.MAVEN);
UiProjectDescriptor _uiProject = this.config.getUiProject();
_uiProject.setEnabled(true);
final Function1<TestProjectDescriptor, Boolean> _function = (TestProjectDescriptor it) -> {
return Boolean.valueOf(it.isEclipsePluginProject());
};
final Function1<TestProjectDescriptor, PomFile> _function_1 = (TestProjectDescriptor it) -> {
return it.pom();
};
final Iterable<PomFile> poms = IterableExtensions.<TestProjectDescriptor, PomFile>map(IterableExtensions.<TestProjectDescriptor>filter(Iterables.<TestProjectDescriptor>filter(this.allJavaProjects(), TestProjectDescriptor.class), _function), _function_1);
final Consumer<PomFile> _function_2 = (PomFile it) -> {
Assert.assertTrue(it.getContent().contains("failIfNoTests"));
};
poms.forEach(_function_2);
}
use of org.eclipse.xtext.xtext.wizard.TestProjectDescriptor in project xtext-core by eclipse.
the class WizardConfigurationTest method inlinedTestProjectsDontOverrideMainSources.
@Test
public void inlinedTestProjectsDontOverrideMainSources() {
TestProjectDescriptor _testProject = this.config.getRuntimeProject().getTestProject();
_testProject.setEnabled(true);
this.config.setPreferredBuildSystem(BuildSystem.MAVEN);
this.config.setSourceLayout(SourceLayout.MAVEN);
final Function1<AbstractFile, Boolean> _function = (AbstractFile it) -> {
String _relativePath = it.getRelativePath();
return Boolean.valueOf(Objects.equal(_relativePath, "pom.xml"));
};
final AbstractFile pom = IterableExtensions.findFirst(this.config.getRuntimeProject().getFiles(), _function);
Assert.assertTrue((pom instanceof PomFile));
Assert.assertTrue(((PomFile) pom).getContent().toString().contains("<artifactId>org.example.mydsl</artifactId>"));
}
Aggregations