summaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/csar/validation/ValidatorUtil.java
blob: 91e3807a79013e831d6c3671fec1fafe9c1db50d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package org.openecomp.sdc.vendorsoftwareproduct.impl.orchestration.csar.validation;

import org.apache.commons.io.IOUtils;

import java.io.IOException;
import java.io.InputStream;

/**
 * Provides util methods for Validation Test classes.
 */

class ValidatorUtil {

    private ValidatorUtil(){

    }

    public static byte[] getFileResource(String filePath) throws IOException{
        InputStream inputStream = ClassLoader.class.getClass().getResourceAsStream(filePath);
        return IOUtils.toByteArray(inputStream);
    }
}