Search in sources :

Example 1 with SearchIndexValidationCreateRequest

use of org.finra.herd.model.api.xml.SearchIndexValidationCreateRequest in project herd by FINRAOS.

the class SearchIndexValidationRestControllerTest method testCreateSearchIndexValidation.

@Test
public void testCreateSearchIndexValidation() {
    // Create a search index validation create request.
    SearchIndexValidationCreateRequest searchIndexValidationCreateRequest = new SearchIndexValidationCreateRequest(new SearchIndexKey(SEARCH_INDEX_NAME), PERFORM_FULL_SEARCH_INDEX_VALIDATION);
    // Create a search index validation response.
    SearchIndexValidation searchIndexValidation = new SearchIndexValidation(new SearchIndexKey(SEARCH_INDEX_NAME), SEARCH_INDEX_STATISTICS_CREATION_DATE, false, false, false);
    // Mock the call to the search index validation service.
    when(searchIndexValidationService.createSearchIndexValidation(searchIndexValidationCreateRequest)).thenReturn(searchIndexValidation);
    // Create a search index validation.
    SearchIndexValidation response = searchIndexValidationRestController.createSearchIndexValidation(searchIndexValidationCreateRequest);
    // Verify the calls.
    verify(searchIndexValidationService, times(1)).createSearchIndexValidation(searchIndexValidationCreateRequest);
    response.setValidateStartTime(SEARCH_INDEX_STATISTICS_CREATION_DATE);
    // Validate the returned object.
    assertEquals(searchIndexValidation, response);
}
Also used : SearchIndexKey(org.finra.herd.model.api.xml.SearchIndexKey) SearchIndexValidationCreateRequest(org.finra.herd.model.api.xml.SearchIndexValidationCreateRequest) SearchIndexValidation(org.finra.herd.model.api.xml.SearchIndexValidation) Test(org.junit.Test)

Example 2 with SearchIndexValidationCreateRequest

use of org.finra.herd.model.api.xml.SearchIndexValidationCreateRequest in project herd by FINRAOS.

the class SearchIndexValidationServiceTest method testCreateSearchIndexValidationTags.

@Test
public void testCreateSearchIndexValidationTags() {
    // Create a search index key.
    SearchIndexKey searchIndexKey = new SearchIndexKey(SEARCH_INDEX_NAME);
    // Get the search index type value.
    String searchIndexType = SearchIndexTypeEntity.SearchIndexTypes.TAG.name();
    // Create a search index create request.
    SearchIndexValidationCreateRequest searchIndexValidationCreateRequest = new SearchIndexValidationCreateRequest(searchIndexKey, NO_PERFORM_FULL_SEARCH_INDEX_VALIDATION);
    searchIndexValidation(searchIndexKey, searchIndexValidationCreateRequest, searchIndexType);
}
Also used : SearchIndexKey(org.finra.herd.model.api.xml.SearchIndexKey) SearchIndexValidationCreateRequest(org.finra.herd.model.api.xml.SearchIndexValidationCreateRequest) Test(org.junit.Test)

Example 3 with SearchIndexValidationCreateRequest

use of org.finra.herd.model.api.xml.SearchIndexValidationCreateRequest in project herd by FINRAOS.

the class SearchIndexValidationServiceTest method testCreateSearchIndexValidationBusinessObjectDefinitionsFull.

@Test
public void testCreateSearchIndexValidationBusinessObjectDefinitionsFull() {
    // Create a search index key.
    SearchIndexKey searchIndexKey = new SearchIndexKey(SEARCH_INDEX_NAME);
    // Get the search index type value.
    String searchIndexType = SearchIndexTypeEntity.SearchIndexTypes.BUS_OBJCT_DFNTN.name();
    // Create a search index create request.
    SearchIndexValidationCreateRequest searchIndexValidationCreateRequest = new SearchIndexValidationCreateRequest(searchIndexKey, PERFORM_FULL_SEARCH_INDEX_VALIDATION);
    searchIndexValidation(searchIndexKey, searchIndexValidationCreateRequest, searchIndexType);
}
Also used : SearchIndexKey(org.finra.herd.model.api.xml.SearchIndexKey) SearchIndexValidationCreateRequest(org.finra.herd.model.api.xml.SearchIndexValidationCreateRequest) Test(org.junit.Test)

Example 4 with SearchIndexValidationCreateRequest

use of org.finra.herd.model.api.xml.SearchIndexValidationCreateRequest in project herd by FINRAOS.

the class SearchIndexValidationServiceTest method testCreateSearchIndexValidationBusinessObjectDefinitions.

@Test
public void testCreateSearchIndexValidationBusinessObjectDefinitions() {
    // Create a search index key.
    SearchIndexKey searchIndexKey = new SearchIndexKey(SEARCH_INDEX_NAME);
    // Get the search index type value.
    String searchIndexType = SearchIndexTypeEntity.SearchIndexTypes.BUS_OBJCT_DFNTN.name();
    // Create a search index create request.
    SearchIndexValidationCreateRequest searchIndexValidationCreateRequest = new SearchIndexValidationCreateRequest(searchIndexKey, NO_PERFORM_FULL_SEARCH_INDEX_VALIDATION);
    searchIndexValidation(searchIndexKey, searchIndexValidationCreateRequest, searchIndexType);
}
Also used : SearchIndexKey(org.finra.herd.model.api.xml.SearchIndexKey) SearchIndexValidationCreateRequest(org.finra.herd.model.api.xml.SearchIndexValidationCreateRequest) Test(org.junit.Test)

Example 5 with SearchIndexValidationCreateRequest

use of org.finra.herd.model.api.xml.SearchIndexValidationCreateRequest in project herd by FINRAOS.

the class SearchIndexValidationServiceTest method testCreateSearchIndexValidationTagsFull.

@Test
public void testCreateSearchIndexValidationTagsFull() {
    // Create a search index key.
    SearchIndexKey searchIndexKey = new SearchIndexKey(SEARCH_INDEX_NAME);
    // Get the search index type value.
    String searchIndexType = SearchIndexTypeEntity.SearchIndexTypes.TAG.name();
    // Create a search index create request.
    SearchIndexValidationCreateRequest searchIndexValidationCreateRequest = new SearchIndexValidationCreateRequest(searchIndexKey, PERFORM_FULL_SEARCH_INDEX_VALIDATION);
    searchIndexValidation(searchIndexKey, searchIndexValidationCreateRequest, searchIndexType);
}
Also used : SearchIndexKey(org.finra.herd.model.api.xml.SearchIndexKey) SearchIndexValidationCreateRequest(org.finra.herd.model.api.xml.SearchIndexValidationCreateRequest) Test(org.junit.Test)

Aggregations

SearchIndexKey (org.finra.herd.model.api.xml.SearchIndexKey)5 SearchIndexValidationCreateRequest (org.finra.herd.model.api.xml.SearchIndexValidationCreateRequest)5 Test (org.junit.Test)5 SearchIndexValidation (org.finra.herd.model.api.xml.SearchIndexValidation)1