Search in sources :

Example 11 with CustomFieldDocument

use of com.synopsys.integration.detect.workflow.blackduck.project.customfields.CustomFieldDocument in project synopsys-detect by blackducksoftware.

the class DetectCustomFieldParserTest method parsedMissingLabelStillList.

@Test
public void parsedMissingLabelStillList() throws DetectUserFriendlyException {
    Map<String, String> props = new HashMap<>();
    props.put("detect.custom.fields.project[0].value", "value1");
    DetectCustomFieldParser parser = new DetectCustomFieldParser();
    CustomFieldDocument document = parser.parseCustomFieldDocument(props);
    CustomFieldElement element = document.getProject().get(0);
    Assertions.assertEquals("", element.getLabel());
}
Also used : CustomFieldDocument(com.synopsys.integration.detect.workflow.blackduck.project.customfields.CustomFieldDocument) CustomFieldElement(com.synopsys.integration.detect.workflow.blackduck.project.customfields.CustomFieldElement) HashMap(java.util.HashMap) Test(org.junit.jupiter.api.Test)

Aggregations

CustomFieldDocument (com.synopsys.integration.detect.workflow.blackduck.project.customfields.CustomFieldDocument)11 HashMap (java.util.HashMap)9 Test (org.junit.jupiter.api.Test)9 CustomFieldElement (com.synopsys.integration.detect.workflow.blackduck.project.customfields.CustomFieldElement)7 ProjectVersionWrapper (com.synopsys.integration.blackduck.service.model.ProjectVersionWrapper)1 CloneFindResult (com.synopsys.integration.detect.workflow.blackduck.project.options.CloneFindResult)1 ParentProjectMapOptions (com.synopsys.integration.detect.workflow.blackduck.project.options.ParentProjectMapOptions)1 ProjectGroupFindResult (com.synopsys.integration.detect.workflow.blackduck.project.options.ProjectGroupFindResult)1 ProjectVersionLicenseFindResult (com.synopsys.integration.detect.workflow.blackduck.project.options.ProjectVersionLicenseFindResult)1 Binder (org.springframework.boot.context.properties.bind.Binder)1 ConfigurationPropertySource (org.springframework.boot.context.properties.source.ConfigurationPropertySource)1 MapConfigurationPropertySource (org.springframework.boot.context.properties.source.MapConfigurationPropertySource)1