Search in sources :

Example 1 with PipenvFreezeParser

use of com.synopsys.integration.detectable.detectables.pipenv.build.parser.PipenvFreezeParser in project synopsys-detect by blackducksoftware.

the class PipenvFreezeParserTests method findsThreeNamesAndVersions.

@Test
void findsThreeNamesAndVersions() {
    List<String> pipFreezeText = new ArrayList<>();
    pipFreezeText.add("simple==1");
    pipFreezeText.add("with-dashes==2.0");
    pipFreezeText.add("dots.and-dashes==3.1.2");
    PipenvFreezeParser pipenvFreezeParser = new PipenvFreezeParser();
    PipFreeze pipFreeze = pipenvFreezeParser.parse(pipFreezeText);
    Assertions.assertEquals(3, pipFreeze.getEntries().size(), "Pip freeze should have created three entries.");
    assertContains("simple", "1", pipFreeze);
    assertContains("with-dashes", "2.0", pipFreeze);
    assertContains("dots.and-dashes", "3.1.2", pipFreeze);
}
Also used : PipenvFreezeParser(com.synopsys.integration.detectable.detectables.pipenv.build.parser.PipenvFreezeParser) ArrayList(java.util.ArrayList) PipFreeze(com.synopsys.integration.detectable.detectables.pipenv.build.model.PipFreeze) Test(org.junit.jupiter.api.Test) UnitTest(com.synopsys.integration.detectable.annotations.UnitTest)

Aggregations

UnitTest (com.synopsys.integration.detectable.annotations.UnitTest)1 PipFreeze (com.synopsys.integration.detectable.detectables.pipenv.build.model.PipFreeze)1 PipenvFreezeParser (com.synopsys.integration.detectable.detectables.pipenv.build.parser.PipenvFreezeParser)1 ArrayList (java.util.ArrayList)1 Test (org.junit.jupiter.api.Test)1