use of com.blackducksoftware.integration.hub.detect.testutils.TestUtil in project hub-detect by blackducksoftware.
the class VndrParserTest method vndrParserTest.
@Test
public void vndrParserTest() throws IOException {
final TestUtil testUtil = new TestUtil();
final VndrParser vndrParser = new VndrParser(new ExternalIdFactory());
final String text = testUtil.getResourceAsUTF8String("/go/vendor.conf");
final List<String> vendorConfContents = Arrays.asList(text.split("\r?\n"));
final DependencyGraph dependencyGraph = vndrParser.parseVendorConf(vendorConfContents);
Assert.assertNotNull(dependencyGraph);
DependencyGraphResourceTestUtil.assertGraph("/go/Go_VndrExpected_graph.json", dependencyGraph);
}
use of com.blackducksoftware.integration.hub.detect.testutils.TestUtil in project hub-detect by blackducksoftware.
the class RebarParserTest method setup.
@BeforeClass
public static void setup() {
externalIdFactory = new ExternalIdFactory();
rebar3TreeParser = new Rebar3TreeParser(externalIdFactory);
testUtil = new TestUtil();
}
use of com.blackducksoftware.integration.hub.detect.testutils.TestUtil in project hub-detect by blackducksoftware.
the class NpmLockfileParserTest method init.
@Before
public void init() {
testUtil = new TestUtil();
npmLockfileParser = new NpmLockfileParser(new GsonBuilder().setPrettyPrinting().create(), new ExternalIdFactory());
}
use of com.blackducksoftware.integration.hub.detect.testutils.TestUtil in project hub-detect by blackducksoftware.
the class PearDependencyTest method init.
@Before
public void init() {
detectConfiguration = Mockito.mock(DetectConfiguration.class);
pearParser = new PearParser(new ExternalIdFactory(), detectConfiguration);
testUtil = new TestUtil();
}
use of com.blackducksoftware.integration.hub.detect.testutils.TestUtil in project hub-detect by blackducksoftware.
the class BitbakeListTasksParserTest method parseTargetArchitectureTest.
@Test
public void parseTargetArchitectureTest() {
final TestUtil testUtil = new TestUtil();
final String listtaskOutput = testUtil.getResourceAsUTF8String("/bitbake/listtasks_output.txt");
final BitbakeListTasksParser bitbakeListTasksParser = new BitbakeListTasksParser();
final Optional<String> architecture = bitbakeListTasksParser.parseTargetArchitecture(listtaskOutput);
assert architecture.isPresent();
System.out.println(architecture.get());
assert architecture.get().equals("i586-poky-linux");
}
Aggregations