Search in sources :

Example 11 with CachingPackageClient

use of org.hl7.fhir.utilities.npm.CachingPackageClient in project org.hl7.fhir.core by hapifhir.

the class CachingPackageClientTests method testVersions2.

@Test
public void testVersions2() throws IOException {
    CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER2);
    List<PackageInfo> matches = client.getVersions("Simplifier.Core.STU3");
    for (PackageInfo pi : matches) {
        System.out.println(pi.toString());
    }
    Assertions.assertTrue(matches.size() == 0);
}
Also used : PackageInfo(org.hl7.fhir.utilities.npm.PackageInfo) CachingPackageClient(org.hl7.fhir.utilities.npm.CachingPackageClient) Test(org.junit.jupiter.api.Test)

Example 12 with CachingPackageClient

use of org.hl7.fhir.utilities.npm.CachingPackageClient in project org.hl7.fhir.core by hapifhir.

the class CachingPackageClientTests method testCase.

@Test
public void testCase() throws IOException {
    CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER1);
    Assertions.assertTrue(client.exists("kbv.basis", "1.1.3"));
    Assertions.assertTrue(client.exists("KBV.Basis", "1.1.3"));
}
Also used : CachingPackageClient(org.hl7.fhir.utilities.npm.CachingPackageClient) Test(org.junit.jupiter.api.Test)

Example 13 with CachingPackageClient

use of org.hl7.fhir.utilities.npm.CachingPackageClient in project org.hl7.fhir.core by hapifhir.

the class CachingPackageClientTests method testSearch.

@Test
public void testSearch() throws IOException {
    CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER1);
    List<PackageInfo> matches = client.search("core", null, null, false);
    for (PackageInfo pi : matches) {
        System.out.println(pi.toString());
    }
    Assertions.assertTrue(matches.size() > 0);
}
Also used : PackageInfo(org.hl7.fhir.utilities.npm.PackageInfo) CachingPackageClient(org.hl7.fhir.utilities.npm.CachingPackageClient) Test(org.junit.jupiter.api.Test)

Example 14 with CachingPackageClient

use of org.hl7.fhir.utilities.npm.CachingPackageClient in project org.hl7.fhir.core by hapifhir.

the class CachingPackageClientTests method testVersions2A.

@Test
public void testVersions2A() throws IOException {
    CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER2);
    List<PackageInfo> matches = client.getVersions("hl7.fhir.us.core");
    for (PackageInfo pi : matches) {
        System.out.println(pi.toString());
    }
    Assertions.assertTrue(matches.size() > 0);
}
Also used : PackageInfo(org.hl7.fhir.utilities.npm.PackageInfo) CachingPackageClient(org.hl7.fhir.utilities.npm.CachingPackageClient) Test(org.junit.jupiter.api.Test)

Aggregations

CachingPackageClient (org.hl7.fhir.utilities.npm.CachingPackageClient)14 Test (org.junit.jupiter.api.Test)13 PackageInfo (org.hl7.fhir.utilities.npm.PackageInfo)11 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 FHIRException (org.hl7.fhir.exceptions.FHIRException)1 FilesystemPackageCacheManager (org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager)1 NpmPackage (org.hl7.fhir.utilities.npm.NpmPackage)1