Search in sources :

Example 1 with NonSysRepo

use of org.wso2.ballerinalang.compiler.packaging.repo.NonSysRepo in project ballerina by ballerina-lang.

the class RepoTest method testSystemOrgIsReserved.

@Test
public void testSystemOrgIsReserved() {
    PackageID pkg = newPackageID("ballerina", "any.pkg", "10.2.3");
    Repo subject = new NonSysRepo<String>(null) {

        @Override
        public Patten calculateNonSysPkg(PackageID pkg) {
            Assert.fail("Tried to calculate path for system packages");
            return null;
        }
    };
    Patten patten = subject.calculate(pkg);
    Assert.assertEquals(patten, Patten.NULL);
}
Also used : ObjRepo(org.wso2.ballerinalang.compiler.packaging.repo.ObjRepo) ProjectSourceRepo(org.wso2.ballerinalang.compiler.packaging.repo.ProjectSourceRepo) HomeRepo(org.wso2.ballerinalang.compiler.packaging.repo.HomeRepo) Repo(org.wso2.ballerinalang.compiler.packaging.repo.Repo) CacheRepo(org.wso2.ballerinalang.compiler.packaging.repo.CacheRepo) NonSysRepo(org.wso2.ballerinalang.compiler.packaging.repo.NonSysRepo) PackageID(org.ballerinalang.model.elements.PackageID) NonSysRepo(org.wso2.ballerinalang.compiler.packaging.repo.NonSysRepo) Patten(org.wso2.ballerinalang.compiler.packaging.Patten) Test(org.testng.annotations.Test)

Aggregations

PackageID (org.ballerinalang.model.elements.PackageID)1 Test (org.testng.annotations.Test)1 Patten (org.wso2.ballerinalang.compiler.packaging.Patten)1 CacheRepo (org.wso2.ballerinalang.compiler.packaging.repo.CacheRepo)1 HomeRepo (org.wso2.ballerinalang.compiler.packaging.repo.HomeRepo)1 NonSysRepo (org.wso2.ballerinalang.compiler.packaging.repo.NonSysRepo)1 ObjRepo (org.wso2.ballerinalang.compiler.packaging.repo.ObjRepo)1 ProjectSourceRepo (org.wso2.ballerinalang.compiler.packaging.repo.ProjectSourceRepo)1 Repo (org.wso2.ballerinalang.compiler.packaging.repo.Repo)1