use of org.ballerinalang.toml.model.Manifest in project ballerina by ballerina-lang.
the class ManifestProcessorTest method testMultipleDependancies.
@Test(description = "Multiple dependencies added to the dependencies section has an effect")
public void testMultipleDependancies() throws IOException {
Manifest manifest = ManifestProcessor.parseTomlContentFromString("[dependencies] \n " + "string-utils = {location = \"src/string-utils\", version = \"1.0.5\" } \n " + "jquery = { version = \"2.2.3\" } \n");
Assert.assertEquals(manifest.getDependencies().get(0).getPackageName(), "string-utils");
Assert.assertEquals(manifest.getDependencies().get(0).getVersion(), "1.0.5");
Assert.assertEquals(manifest.getDependencies().get(1).getPackageName(), "jquery");
Assert.assertEquals(manifest.getDependencies().get(1).getVersion(), "2.2.3");
}
use of org.ballerinalang.toml.model.Manifest in project ballerina by ballerina-lang.
the class ManifestProcessorTest method testSinglePatch.
@Test(description = "One patch added to the patches section has an effect")
public void testSinglePatch() throws IOException {
Manifest manifest = ManifestProcessor.parseTomlContentFromString("[patches] \n " + "string-utils = {version = \"1.6.1\", location = \"src/patches/string-utils\" } \n");
Assert.assertEquals(manifest.getPatches().get(0).getPackageName(), "string-utils");
Assert.assertEquals(manifest.getPatches().get(0).getVersion(), "1.6.1");
Assert.assertEquals(manifest.getPatches().get(0).getLocation(), "src/patches/string-utils");
}
use of org.ballerinalang.toml.model.Manifest in project ballerina by ballerina-lang.
the class ManifestProcessorTest method testDescription.
@Test(description = "Description in package section has an effect")
public void testDescription() throws IOException {
Manifest manifest = ManifestProcessor.parseTomlContentFromString("[project] \n" + "description = \"This is a description about the package\"");
Assert.assertEquals(manifest.getDescription(), "This is a description about the package");
}
use of org.ballerinalang.toml.model.Manifest in project ballerina by ballerina-lang.
the class ManifestProcessorTest method testRepositoryURL.
@Test(description = "Repository url in package section has an effect")
public void testRepositoryURL() throws IOException {
Manifest manifest = ManifestProcessor.parseTomlContentFromString("[project] \n " + "repository = \"https://github.com/ballerinalang/ballerina\"");
Assert.assertEquals(manifest.getRepositoryURL(), "https://github.com/ballerinalang/ballerina");
}
Aggregations