use of org.ballerinalang.toml.model.Manifest in project ballerina by ballerina-lang.
the class ManifestProcessorTest method testEmptyAuthorArray.
@Test(description = "Empty author array in package section has an effect")
public void testEmptyAuthorArray() throws IOException {
Manifest manifest = ManifestProcessor.parseTomlContentFromString("[project] \n" + "authors = []");
Assert.assertEquals(manifest.getAuthors().size(), 0);
}
use of org.ballerinalang.toml.model.Manifest in project ballerina by ballerina-lang.
the class ManifestProcessorTest method testHomePageURL.
@Test(description = "Homepage url in package section has an effect")
public void testHomePageURL() throws IOException {
Manifest manifest = ManifestProcessor.parseTomlContentFromString("[project] \n " + "homepage = \"https://ballerinalang.org/\"");
Assert.assertEquals(manifest.getHomepageURL(), "https://ballerinalang.org/");
}
use of org.ballerinalang.toml.model.Manifest in project ballerina by ballerina-lang.
the class ManifestProcessorTest method testLicenseDescription.
@Test(description = "Description in package section has an effect")
public void testLicenseDescription() throws IOException {
Manifest manifest = ManifestProcessor.parseTomlContentFromString("[project] \n " + "license = \"MIT OR Apache-2.0\"");
Assert.assertEquals(manifest.getLicense(), "MIT OR Apache-2.0");
}
use of org.ballerinalang.toml.model.Manifest in project ballerina by ballerina-lang.
the class ManifestProcessorTest method testPackageName.
@Test(description = "Package name in package section has an effect")
public void testPackageName() throws IOException {
Manifest manifest = ManifestProcessor.parseTomlContentFromString("[project] \n" + "#Name of the package \n org-name = \"foo\"");
Assert.assertEquals(manifest.getName(), "foo");
}
use of org.ballerinalang.toml.model.Manifest in project ballerina by ballerina-lang.
the class ManifestProcessorTest method testAuthors.
@Test(description = "Authors in package section has an effect")
public void testAuthors() throws IOException {
Manifest manifest = ManifestProcessor.parseTomlContentFromString("[project] \n" + "authors = [\"tyler@wso2.com\", \"manu@wso2.com\"]");
Assert.assertEquals(manifest.getAuthors().get(0), "tyler@wso2.com");
Assert.assertEquals(manifest.getAuthors().get(1), "manu@wso2.com");
}
Aggregations