Search in sources :

Example 31 with Project

use of org.opengrok.indexer.configuration.Project in project OpenGrok by OpenGrok.

the class ProjectHelperTest method testGetRepositories.

/**
 * Test of getRepositories method, of class ProjectHelper.
 */
@Test
public void testGetRepositories() {
    Set<Project> result = helper.getRepositories();
    assertEquals(2, result.size());
    for (Project p : result) {
        assertTrue(p.getName().startsWith("allowed_"));
    }
}
Also used : Project(org.opengrok.indexer.configuration.Project) Test(org.junit.jupiter.api.Test)

Example 32 with Project

use of org.opengrok.indexer.configuration.Project in project OpenGrok by OpenGrok.

the class ProjectHelperTest method testGetUngroupedRepositories.

/**
 * Test of getUngroupedRepositories method, of class ProjectHelper.
 */
@Test
public void testGetUngroupedRepositories() {
    Set<Project> result = helper.getUngroupedRepositories();
    assertEquals(2, result.size());
    for (Project p : result) {
        assertTrue(p.getName().startsWith("allowed_"));
    }
}
Also used : Project(org.opengrok.indexer.configuration.Project) Test(org.junit.jupiter.api.Test)

Example 33 with Project

use of org.opengrok.indexer.configuration.Project in project OpenGrok by OpenGrok.

the class ProjectHelperTest method testGetGroupedRepositories.

/**
 * Test of getGroupedRepositories method, of class ProjectHelper.
 */
@Test
public void testGetGroupedRepositories() {
    Set<Project> result = helper.getGroupedRepositories();
    assertEquals(4, result.size());
    for (Project p : result) {
        assertTrue(p.getName().startsWith("allowed_"));
    }
}
Also used : Project(org.opengrok.indexer.configuration.Project) Test(org.junit.jupiter.api.Test)

Example 34 with Project

use of org.opengrok.indexer.configuration.Project in project OpenGrok by OpenGrok.

the class ProjectHelperTest method testGetAllGrouped.

/**
 * Test of getAllGrouped method, of class ProjectHelper.
 */
@Test
public void testGetAllGrouped() {
    Set<Project> result = helper.getAllGrouped();
    assertEquals(8, result.size());
    for (Project p : result) {
        assertTrue(p.getName().startsWith("allowed_"));
    }
}
Also used : Project(org.opengrok.indexer.configuration.Project) Test(org.junit.jupiter.api.Test)

Example 35 with Project

use of org.opengrok.indexer.configuration.Project in project OpenGrok by OpenGrok.

the class ProjectHelperTest method testGetUngroupedProjects.

/**
 * Test of getUngroupedProjects method, of class ProjectHelper.
 */
@Test
public void testGetUngroupedProjects() {
    Set<Project> result = helper.getUngroupedProjects();
    assertEquals(2, result.size());
    for (Project p : result) {
        assertTrue(p.getName().startsWith("allowed_"));
    }
}
Also used : Project(org.opengrok.indexer.configuration.Project) Test(org.junit.jupiter.api.Test)

Aggregations

Project (org.opengrok.indexer.configuration.Project)88 Test (org.junit.jupiter.api.Test)42 RuntimeEnvironment (org.opengrok.indexer.configuration.RuntimeEnvironment)27 File (java.io.File)22 Group (org.opengrok.indexer.configuration.Group)20 RepositoryInfo (org.opengrok.indexer.history.RepositoryInfo)17 ArrayList (java.util.ArrayList)16 TreeSet (java.util.TreeSet)11 IOException (java.io.IOException)10 DummyHttpServletRequest (org.opengrok.indexer.web.DummyHttpServletRequest)10 List (java.util.List)8 HttpServletRequest (jakarta.servlet.http.HttpServletRequest)7 Path (jakarta.ws.rs.Path)7 HistoryGuru (org.opengrok.indexer.history.HistoryGuru)7 Path (java.nio.file.Path)6 Map (java.util.Map)6 Paths (java.nio.file.Paths)5 Set (java.util.Set)5 Collectors (java.util.stream.Collectors)5 MercurialRepositoryTest (org.opengrok.indexer.history.MercurialRepositoryTest)5