Search in sources :

Example 6 with Glob

use of com.google.idea.blaze.base.projectview.section.Glob in project intellij by bazelbuild.

the class ProjectViewParserTest method testTestSources.

@Test
public void testTestSources() throws Exception {
    projectViewStorageManager.add(".blazeproject", "test_sources:", "  javatests/com/google", "  javatests/com/google/android/*");
    projectViewParser.parseProjectView(new File(".blazeproject"));
    errorCollector.assertNoIssues();
    ProjectViewSet projectViewSet = projectViewParser.getResult();
    Collection<Glob> entries = projectViewSet.listItems(TestSourceSection.KEY);
    assertThat(entries).containsExactly(new Glob("javatests/com/google"), new Glob("javatests/com/google/android/*")).inOrder();
}
Also used : ProjectViewSet(com.google.idea.blaze.base.projectview.ProjectViewSet) Glob(com.google.idea.blaze.base.projectview.section.Glob) File(java.io.File) Test(org.junit.Test)

Aggregations

Glob (com.google.idea.blaze.base.projectview.section.Glob)6 Test (org.junit.Test)4 WorkspacePath (com.google.idea.blaze.base.model.primitives.WorkspacePath)3 BlazeJavaImportResult (com.google.idea.blaze.java.sync.model.BlazeJavaImportResult)3 TargetMapBuilder (com.google.idea.blaze.base.ideinfo.TargetMapBuilder)2 ProjectView (com.google.idea.blaze.base.projectview.ProjectView)2 LibraryArtifact (com.google.idea.blaze.base.ideinfo.LibraryArtifact)1 BlazeProjectData (com.google.idea.blaze.base.model.BlazeProjectData)1 ProjectViewEdit (com.google.idea.blaze.base.projectview.ProjectViewEdit)1 ProjectViewSet (com.google.idea.blaze.base.projectview.ProjectViewSet)1 ListSection (com.google.idea.blaze.base.projectview.section.ListSection)1 ScalarSection (com.google.idea.blaze.base.projectview.section.ScalarSection)1 Section (com.google.idea.blaze.base.projectview.section.Section)1 SectionParser (com.google.idea.blaze.base.projectview.section.SectionParser)1 AdditionalLanguagesSection (com.google.idea.blaze.base.projectview.section.sections.AdditionalLanguagesSection)1 BuildFlagsSection (com.google.idea.blaze.base.projectview.section.sections.BuildFlagsSection)1 DirectorySection (com.google.idea.blaze.base.projectview.section.sections.DirectorySection)1 ExcludeTargetSection (com.google.idea.blaze.base.projectview.section.sections.ExcludeTargetSection)1 ExcludedSourceSection (com.google.idea.blaze.base.projectview.section.sections.ExcludedSourceSection)1 ImportSection (com.google.idea.blaze.base.projectview.section.sections.ImportSection)1