Search in sources :

Example 1 with SystemStatusAccessor

use of com.synopsys.integration.alert.common.persistence.accessor.SystemStatusAccessor in project hub-alert by blackducksoftware.

the class AboutActionsTest method testGetAboutDataNotPresent.

@Test
public void testGetAboutDataNotPresent() {
    Gson gson = new Gson();
    AlertWebServerUrlManager alertWebServerUrlManager = Mockito.mock(AlertWebServerUrlManager.class);
    SystemStatusAccessor systemStatusAccessor = Mockito.mock(SystemStatusAccessor.class);
    DescriptorMetadataActions descriptorActions = Mockito.mock(DescriptorMetadataActions.class);
    AboutReader aboutReader = new AboutReader(gson, alertWebServerUrlManager, systemStatusAccessor, descriptorActions);
    AboutActions aboutActions = new AboutActions(aboutReader);
    ActionResponse<AboutModel> resultModel = aboutActions.getAboutModel();
    assertTrue(resultModel.isError());
    assertFalse(resultModel.hasContent());
}
Also used : SystemStatusAccessor(com.synopsys.integration.alert.common.persistence.accessor.SystemStatusAccessor) Gson(com.google.gson.Gson) DescriptorMetadataActions(com.synopsys.integration.alert.web.api.metadata.DescriptorMetadataActions) AlertWebServerUrlManager(com.synopsys.integration.alert.common.rest.AlertWebServerUrlManager) Test(org.junit.jupiter.api.Test)

Aggregations

Gson (com.google.gson.Gson)1 SystemStatusAccessor (com.synopsys.integration.alert.common.persistence.accessor.SystemStatusAccessor)1 AlertWebServerUrlManager (com.synopsys.integration.alert.common.rest.AlertWebServerUrlManager)1 DescriptorMetadataActions (com.synopsys.integration.alert.web.api.metadata.DescriptorMetadataActions)1 Test (org.junit.jupiter.api.Test)1