Search in sources :

Example 1 with UsageType

use of com.synopsys.integration.blackduck.api.generated.enumeration.UsageType in project hub-alert by blackducksoftware.

the class BlackDuckMessageAttributesUtilsTest method testGetUsageLinkableItemsNullUsageIncluded.

@Test
public void testGetUsageLinkableItemsNullUsageIncluded() {
    ProjectVersionComponentVersionView projectVersionComponentView = new ProjectVersionComponentVersionView();
    List<UsageType> listWithNull = new ArrayList<>();
    listWithNull.add(UsageType.PREREQUISITE);
    listWithNull.add(null);
    projectVersionComponentView.setUsages(listWithNull);
    String usage = BlackDuckMessageAttributesUtils.extractUsage(projectVersionComponentView);
    assertEquals(UsageType.PREREQUISITE.prettyPrint(), usage);
}
Also used : ArrayList(java.util.ArrayList) UsageType(com.synopsys.integration.blackduck.api.generated.enumeration.UsageType) ProjectVersionComponentVersionView(com.synopsys.integration.blackduck.api.generated.view.ProjectVersionComponentVersionView) Test(org.junit.jupiter.api.Test)

Aggregations

UsageType (com.synopsys.integration.blackduck.api.generated.enumeration.UsageType)1 ProjectVersionComponentVersionView (com.synopsys.integration.blackduck.api.generated.view.ProjectVersionComponentVersionView)1 ArrayList (java.util.ArrayList)1 Test (org.junit.jupiter.api.Test)1