Search in sources :

Example 6 with MockCommonDistributionEntity

use of com.blackducksoftware.integration.hub.alert.mock.entity.MockCommonDistributionEntity in project hub-alert by blackducksoftware.

the class ControllerTest method setup.

@Before
public void setup() {
    gson = new Gson();
    mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).apply(SecurityMockMvcConfigurers.springSecurity()).build();
    entityRepository = getEntityRepository();
    entityRepository.deleteAllInBatch();
    entityMockUtil = getEntityMockUtil();
    restModelMockUtil = getRestModelMockUtil();
    distributionMockUtil = new MockCommonDistributionEntity();
    restModel = restModelMockUtil.createRestModel();
    entity = entityMockUtil.createEntity();
    entityRepository.save(entity);
    restUrl = "/api/" + getRestControllerUrl();
}
Also used : Gson(com.google.gson.Gson) MockCommonDistributionEntity(com.blackducksoftware.integration.hub.alert.mock.entity.MockCommonDistributionEntity) Before(org.junit.Before)

Aggregations

MockCommonDistributionEntity (com.blackducksoftware.integration.hub.alert.mock.entity.MockCommonDistributionEntity)6 MockNotificationEntity (com.blackducksoftware.integration.hub.alert.mock.entity.MockNotificationEntity)3 Test (org.junit.Test)3 MockAuditEntryEntity (com.blackducksoftware.integration.hub.alert.audit.mock.MockAuditEntryEntity)2 AuditEntryEntity (com.blackducksoftware.integration.hub.alert.audit.repository.AuditEntryEntity)2 AuditNotificationRelation (com.blackducksoftware.integration.hub.alert.audit.repository.relation.AuditNotificationRelation)2 CommonDistributionConfigEntity (com.blackducksoftware.integration.hub.alert.datasource.entity.CommonDistributionConfigEntity)2 NotificationEntity (com.blackducksoftware.integration.hub.alert.datasource.entity.NotificationEntity)2 DatabaseConnectionTest (com.blackducksoftware.integration.test.annotation.DatabaseConnectionTest)2 Date (java.sql.Date)2 Before (org.junit.Before)2 NotificationManager (com.blackducksoftware.integration.hub.alert.NotificationManager)1 AuditEntryRepositoryWrapper (com.blackducksoftware.integration.hub.alert.audit.repository.AuditEntryRepositoryWrapper)1 AuditNotificationRepositoryWrapper (com.blackducksoftware.integration.hub.alert.audit.repository.AuditNotificationRepositoryWrapper)1 CommonDistributionRepositoryWrapper (com.blackducksoftware.integration.hub.alert.datasource.entity.repository.CommonDistributionRepositoryWrapper)1 NotificationRepositoryWrapper (com.blackducksoftware.integration.hub.alert.datasource.entity.repository.NotificationRepositoryWrapper)1 VulnerabilityRepositoryWrapper (com.blackducksoftware.integration.hub.alert.datasource.entity.repository.VulnerabilityRepositoryWrapper)1 AlertException (com.blackducksoftware.integration.hub.alert.exception.AlertException)1 ObjectTransformer (com.blackducksoftware.integration.hub.alert.web.ObjectTransformer)1 ComponentRestModel (com.blackducksoftware.integration.hub.alert.web.model.ComponentRestModel)1