Search in sources :

Example 6 with IN4JSProject

use of org.eclipse.n4js.projectModel.IN4JSProject in project n4js by eclipse.

the class AbstractN4JSCoreTest method testCreateYieldsEqualsInstances_01.

@SuppressWarnings("javadoc")
@Test
public void testCreateYieldsEqualsInstances_01() {
    IN4JSProject first = getN4JSCore().create(myProjectURI);
    IN4JSProject second = getN4JSCore().create(myProjectURI);
    assertEquals(first, second);
}
Also used : IN4JSProject(org.eclipse.n4js.projectModel.IN4JSProject) Test(org.junit.Test)

Example 7 with IN4JSProject

use of org.eclipse.n4js.projectModel.IN4JSProject in project n4js by eclipse.

the class AbstractN4JSArchiveTest method getArchive.

/**
 */
protected IN4JSArchive getArchive() {
    IN4JSProject project = getN4JSCore().create(myProjectURI);
    assertEquals(1, project.getLibraries().size());
    return project.getLibraries().get(0);
}
Also used : IN4JSProject(org.eclipse.n4js.projectModel.IN4JSProject)

Example 8 with IN4JSProject

use of org.eclipse.n4js.projectModel.IN4JSProject in project n4js by eclipse.

the class AbstractN4JSProjectTest method testGetSourceContainers_03.

@SuppressWarnings("javadoc")
@Test
public void testGetSourceContainers_03() {
    IN4JSProject project = getN4JSCore().create(myProjectURI);
    ImmutableList<? extends IN4JSSourceContainer> first = project.getSourceContainers();
    ImmutableList<? extends IN4JSSourceContainer> second = project.getSourceContainers();
    assertEquals(first, second);
}
Also used : IN4JSProject(org.eclipse.n4js.projectModel.IN4JSProject) Test(org.junit.Test)

Example 9 with IN4JSProject

use of org.eclipse.n4js.projectModel.IN4JSProject in project n4js by eclipse.

the class AbstractN4JSProjectTest method testGetDependencies_02.

@SuppressWarnings("javadoc")
@Test
public void testGetDependencies_02() {
    URI doesNotExist = myProjectURI.trimSegments(1).appendSegment("doesNotExist");
    IN4JSProject project = getN4JSCore().create(doesNotExist);
    ImmutableList<? extends IN4JSProject> dependencies = project.getDependencies();
    assertEquals(0, dependencies.size());
}
Also used : IN4JSProject(org.eclipse.n4js.projectModel.IN4JSProject) URI(org.eclipse.emf.common.util.URI) Test(org.junit.Test)

Example 10 with IN4JSProject

use of org.eclipse.n4js.projectModel.IN4JSProject in project n4js by eclipse.

the class AbstractN4JSProjectTest method testGetLibraries_03.

@SuppressWarnings("javadoc")
@Test
public void testGetLibraries_03() {
    IN4JSProject project = getN4JSCore().create(myProjectURI);
    ImmutableList<? extends IN4JSArchive> first = project.getLibraries();
    ImmutableList<? extends IN4JSArchive> second = project.getLibraries();
    assertEquals(first, second);
}
Also used : IN4JSProject(org.eclipse.n4js.projectModel.IN4JSProject) Test(org.junit.Test)

Aggregations

IN4JSProject (org.eclipse.n4js.projectModel.IN4JSProject)93 URI (org.eclipse.emf.common.util.URI)32 Test (org.junit.Test)18 ArrayList (java.util.ArrayList)13 List (java.util.List)11 Inject (com.google.inject.Inject)9 Map (java.util.Map)9 IProject (org.eclipse.core.resources.IProject)9 IN4JSCore (org.eclipse.n4js.projectModel.IN4JSCore)9 Optional (com.google.common.base.Optional)7 File (java.io.File)7 Collection (java.util.Collection)7 HashSet (java.util.HashSet)7 ResourceSet (org.eclipse.emf.ecore.resource.ResourceSet)7 Set (java.util.Set)6 Collectors (java.util.stream.Collectors)6 IOException (java.io.IOException)5 IN4JSArchive (org.eclipse.n4js.projectModel.IN4JSArchive)5 IN4JSSourceContainer (org.eclipse.n4js.projectModel.IN4JSSourceContainer)5 FluentIterable.from (com.google.common.collect.FluentIterable.from)4