Search in sources :

Example 81 with IN4JSProject

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

the class AbstractN4JSCoreTest method testCreateProjectAndCheckExists_01.

@SuppressWarnings("javadoc")
@Test
public void testCreateProjectAndCheckExists_01() {
    IN4JSProject project = getN4JSCore().create(myProjectURI.trimSegments(1).appendSegment("doesNotExist"));
    assertNotNull(project);
    assertFalse(project.exists());
}
Also used : IN4JSProject(org.eclipse.n4js.projectModel.IN4JSProject) Test(org.junit.Test)

Example 82 with IN4JSProject

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

the class AbstractN4JSCoreTest method testCreateProjectAndCheckExists_02.

@SuppressWarnings("javadoc")
@Test
public void testCreateProjectAndCheckExists_02() {
    IN4JSProject project = getN4JSCore().create(myProjectURI);
    assertNotNull(project);
    assertTrue(project.exists());
}
Also used : IN4JSProject(org.eclipse.n4js.projectModel.IN4JSProject) Test(org.junit.Test)

Example 83 with IN4JSProject

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

the class AbstractN4JSProjectTest method testGetLocation_01.

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

Example 84 with IN4JSProject

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

the class AbstractN4JSProjectTest method testGetSourceContainers_02.

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

Example 85 with IN4JSProject

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

the class AbstractN4JSProjectTest method testGetLibraries_02.

@SuppressWarnings("javadoc")
@Test
public void testGetLibraries_02() {
    URI doesNotExist = myProjectURI.trimSegments(1).appendSegment("doesNotExist");
    IN4JSProject project = getN4JSCore().create(doesNotExist);
    ImmutableList<? extends IN4JSArchive> libraries = project.getLibraries();
    assertEquals(0, libraries.size());
}
Also used : IN4JSProject(org.eclipse.n4js.projectModel.IN4JSProject) URI(org.eclipse.emf.common.util.URI) 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