use of org.eclipse.che.ide.ext.java.shared.dto.classpath.ClasspathEntryDto in project che by eclipse.
the class SourcepathMacroTest method sourcepathShouldBeBuiltWith2Libraries.
@Test
public void sourcepathShouldBeBuiltWith2Libraries() throws Exception {
String source1 = "/name/source1";
String source2 = "/name/source2";
List<ClasspathEntryDto> entries = new ArrayList<>();
Set<String> sources = new HashSet<>();
sources.add(source1);
sources.add(source2);
when(classpathContainer.getClasspathEntries(anyString())).thenReturn(classpathEntriesPromise);
when(classpathResolver.getSources()).thenReturn(sources);
sourcepathMacro.expand();
verify(classpathEntriesPromise).then(classpathEntriesCapture.capture());
String classpath = classpathEntriesCapture.getValue().apply(entries);
verify(classpathResolver).resolveClasspathEntries(entries);
assertEquals("source2:source1:", classpath);
}
Aggregations