Search in sources :

Example 1 with RepositoryImportEvent

use of sonia.scm.repository.RepositoryImportEvent in project scm-review-plugin by scm-manager.

the class CommentIndexerTest method shouldNotCreateIndexAfterFailedImport.

@Test
void shouldNotCreateIndexAfterFailedImport() {
    indexer.handleEvent(new RepositoryImportEvent(repository, true));
    verify(forType, never()).update(any(SerializableIndexTask.class));
}
Also used : SerializableIndexTask(sonia.scm.search.SerializableIndexTask) RepositoryImportEvent(sonia.scm.repository.RepositoryImportEvent) Test(org.junit.jupiter.api.Test)

Example 2 with RepositoryImportEvent

use of sonia.scm.repository.RepositoryImportEvent in project scm-review-plugin by scm-manager.

the class PullRequestIndexerTest method shouldNotCreateIndexAfterFailedImport.

@Test
void shouldNotCreateIndexAfterFailedImport() {
    indexer.handleEvent(new RepositoryImportEvent(repository, true));
    verify(forType, never()).update(any(SerializableIndexTask.class));
}
Also used : SerializableIndexTask(sonia.scm.search.SerializableIndexTask) RepositoryImportEvent(sonia.scm.repository.RepositoryImportEvent) Test(org.junit.jupiter.api.Test)

Example 3 with RepositoryImportEvent

use of sonia.scm.repository.RepositoryImportEvent in project scm-review-plugin by scm-manager.

the class PullRequestIndexerTest method shouldCreateIndexAfterSuccessfulImport.

@Test
void shouldCreateIndexAfterSuccessfulImport() {
    indexer.handleEvent(new RepositoryImportEvent(repository, false));
    verify(forType).update(any(SerializableIndexTask.class));
}
Also used : SerializableIndexTask(sonia.scm.search.SerializableIndexTask) RepositoryImportEvent(sonia.scm.repository.RepositoryImportEvent) Test(org.junit.jupiter.api.Test)

Example 4 with RepositoryImportEvent

use of sonia.scm.repository.RepositoryImportEvent in project scm-review-plugin by scm-manager.

the class CommentIndexerTest method shouldCreateIndexAfterSuccessfulImport.

@Test
void shouldCreateIndexAfterSuccessfulImport() {
    indexer.handleEvent(new RepositoryImportEvent(repository, false));
    verify(forType).update(any(SerializableIndexTask.class));
}
Also used : SerializableIndexTask(sonia.scm.search.SerializableIndexTask) RepositoryImportEvent(sonia.scm.repository.RepositoryImportEvent) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)4 RepositoryImportEvent (sonia.scm.repository.RepositoryImportEvent)4 SerializableIndexTask (sonia.scm.search.SerializableIndexTask)4