use of org.ballerinalang.toml.model.Manifest in project ballerina by ballerina-lang.
the class ManifestProcessorTest method testKeywords.
@Test(description = "Keywords in package section has an effect")
public void testKeywords() throws IOException {
Manifest manifest = ManifestProcessor.parseTomlContentFromString("[project] \n" + "keywords=[\"ballerina\",\"security\",\"security\"]");
Assert.assertEquals(manifest.getKeywords().get(0), "ballerina");
Assert.assertEquals(manifest.getKeywords().get(1), "security");
Assert.assertEquals(manifest.getKeywords().size(), 3);
}
use of org.ballerinalang.toml.model.Manifest in project ballerina by ballerina-lang.
the class ManifestProcessorTest method testReadmeFilePath.
@Test(description = "Readme file path in package section has an effect")
public void testReadmeFilePath() throws IOException {
Manifest manifest = ManifestProcessor.parseTomlContentFromString("[project] \n " + "readme = \"https://github.com/ballerinalang/composer/blob/master/README.md\"");
Assert.assertEquals(manifest.getReadmeFilePath(), "https://github.com/ballerinalang/composer/blob" + "/master/README.md");
}
use of org.ballerinalang.toml.model.Manifest in project ballerina by ballerina-lang.
the class ManifestProcessorTest method testSingleDependanciesAdded.
@Test(description = "One dependency added to the dependencies section individually has an effect")
public void testSingleDependanciesAdded() throws IOException {
Manifest manifest = ManifestProcessor.parseTomlContentFromString("[dependencies.string-utils] \n " + "version = \"1.0.5\" \n location = \"src/string-utils\"");
Assert.assertEquals(manifest.getDependencies().get(0).getPackageName(), "string-utils");
Assert.assertEquals(manifest.getDependencies().get(0).getVersion(), "1.0.5");
Assert.assertEquals(manifest.getDependencies().get(0).getLocation(), "src/string-utils");
}
use of org.ballerinalang.toml.model.Manifest in project ballerina by ballerina-lang.
the class ManifestProcessorTest method testSingleDependancies.
@Test(description = "One dependency added to the dependencies section has an effect")
public void testSingleDependancies() throws IOException {
Manifest manifest = ManifestProcessor.parseTomlContentFromString("[dependencies] \n " + "string-utils = {location = \"src/string-utils\", version = \"1.1.5\"} \n");
Assert.assertEquals(manifest.getDependencies().get(0).getPackageName(), "string-utils");
Assert.assertEquals(manifest.getDependencies().get(0).getVersion(), "1.1.5");
Assert.assertEquals(manifest.getDependencies().get(0).getLocation(), "src/string-utils");
}
use of org.ballerinalang.toml.model.Manifest in project ballerina by ballerina-lang.
the class ManifestProcessorTest method testVersionNeg.
@Test(description = "Version in non-package section has no effect")
public void testVersionNeg() throws IOException {
Manifest manifest = ManifestProcessor.parseTomlContentFromString("[patch] \n version = \"v1\"");
Assert.assertNotEquals(manifest.getVersion(), "v1");
}
Aggregations