Search in sources :

Example 1 with Library

use of com.android.builder.model.level2.Library in project tesb-rt-se by Talend.

the class SamEnablingAssertionTest method commonTest.

private void commonTest(String testName, String searchFor, String isbn, String expectedResult) {
    final String dir = testName;
    serviceContext = startParticipants(dir);
    Library client = (Library) serviceContext.getBean("libraryHttp");
    ListOfBooks response = null;
    try {
        response = searchFor(searchFor, isbn, client);
    } catch (SeekBookError e) {
        fail("Exception during service call");
    }
    assertEquals("Books amount in response differs from 1", 1, booksInResponse(response));
    assertEquals("Received unexpected author name", expectedResult, authorLastName(response));
}
Also used : SeekBookError(org.talend.services.test.library._1_0.SeekBookError) Library(org.talend.services.test.library._1_0.Library) ListOfBooks(org.talend.types.test.library.common._1.ListOfBooks)

Example 2 with Library

use of com.android.builder.model.level2.Library in project tesb-rt-se by Talend.

the class SamEnablingFeatureTest method commonTest.

private void commonTest(String testName, String searchFor, String isbn, String expectedResult) {
    final String dir = testName;
    serviceContext = startProvider(dir);
    Library client = (Library) serviceContext.getBean("libraryHttp");
    ListOfBooks response = null;
    try {
        response = searchFor(searchFor, isbn, client);
    } catch (SeekBookError e) {
        fail("Exception during service call");
    }
    assertEquals("Books amount in response differs from 1", 1, booksInResponse(response));
    assertEquals("Received unexpected author name", expectedResult, authorLastName(response));
}
Also used : SeekBookError(org.talend.services.test.library._1_0.SeekBookError) Library(org.talend.services.test.library._1_0.Library) ListOfBooks(org.talend.types.test.library.common._1.ListOfBooks)

Example 3 with Library

use of com.android.builder.model.level2.Library in project tesb-rt-se by Talend.

the class CompressionAssertionTest method commonTest.

private void commonTest(String testName, String searchFor, String isbn, String expectedResult) {
    final String dir = testName;
    serviceContext = startParticipants(dir);
    Library client = (Library) serviceContext.getBean("libraryHttp");
    ListOfBooks response = null;
    try {
        response = searchFor(searchFor, isbn, client);
    } catch (SeekBookError e) {
        fail("Exception during service call");
    }
    assertEquals("Books amount in response differs from 1", 1, booksInResponse(response));
    assertEquals("Received unexpected author name", expectedResult, authorLastName(response));
}
Also used : SeekBookError(org.talend.services.test.library._1_0.SeekBookError) Library(org.talend.services.test.library._1_0.Library) ListOfBooks(org.talend.types.test.library.common._1.ListOfBooks)

Example 4 with Library

use of com.android.builder.model.level2.Library in project tesb-rt-se by Talend.

the class CompressionFeatureTest method commonTest.

private void commonTest(String testName, String searchFor, String isbn, String expectedResult) {
    final String dir = testName;
    serviceContext = startProvider(dir);
    Library client = (Library) serviceContext.getBean("libraryHttp");
    ListOfBooks response = null;
    try {
        response = searchFor(searchFor, isbn, client);
    } catch (SeekBookError e) {
        fail("Exception during service call");
    }
    assertEquals("Books amount in response differs from 1", 1, booksInResponse(response));
    assertEquals("Received unexpected author name", expectedResult, authorLastName(response));
}
Also used : SeekBookError(org.talend.services.test.library._1_0.SeekBookError) Library(org.talend.services.test.library._1_0.Library) ListOfBooks(org.talend.types.test.library.common._1.ListOfBooks)

Example 5 with Library

use of com.android.builder.model.level2.Library in project atlas by alibaba.

the class AtlasDependencyGraph method instantiateLibrary.

@NonNull
private static Library instantiateLibrary(@NonNull AtlasDependencyGraph.HashableResolvedArtifactResult artifact) {
    Library library;
    ComponentIdentifier id = artifact.getId().getComponentIdentifier();
    String address = AtlasDependencyGraph.computeAddress(artifact);
    if (!(id instanceof ProjectComponentIdentifier) || artifact.isWrappedModule()) {
        if (artifact.getDependencyType() == DependencyType.ANDROID || artifact.getDependencyType() == DependencyType.AWB) {
            File explodedFolder = artifact.getFile();
            library = new com.android.build.gradle.internal.ide.level2.AndroidLibraryImpl(address, artifact.bundleResult != null ? artifact.bundleResult.getFile() : // fallback so that the value is non-null
            explodedFolder, explodedFolder, findLocalJarsAsStrings(explodedFolder));
        } else {
            library = new JavaLibraryImpl(address, artifact.getFile());
        }
    } else {
        library = new ModuleLibraryImpl(address, ((ProjectComponentIdentifier) id).getProjectPath(), getVariant(artifact));
    }
    synchronized (sGlobalLibrary) {
        sGlobalLibrary.put(library.getArtifactAddress(), library);
    }
    return library;
}
Also used : JavaLibraryImpl(com.android.build.gradle.internal.ide.level2.JavaLibraryImpl) ProjectComponentIdentifier(org.gradle.api.artifacts.component.ProjectComponentIdentifier) ComponentIdentifier(org.gradle.api.artifacts.component.ComponentIdentifier) ModuleComponentIdentifier(org.gradle.api.artifacts.component.ModuleComponentIdentifier) JvmLibrary(org.gradle.jvm.JvmLibrary) Library(com.android.builder.model.level2.Library) ProjectComponentIdentifier(org.gradle.api.artifacts.component.ProjectComponentIdentifier) File(java.io.File) com.android.build.gradle.internal.ide.level2(com.android.build.gradle.internal.ide.level2) NonNull(com.android.annotations.NonNull)

Aggregations

Library (org.talend.services.test.library._1_0.Library)8 SeekBookError (org.talend.services.test.library._1_0.SeekBookError)8 ListOfBooks (org.talend.types.test.library.common._1.ListOfBooks)6 Library (com.android.builder.model.level2.Library)2 JvmLibrary (org.gradle.jvm.JvmLibrary)2 NonNull (com.android.annotations.NonNull)1 ConfigurationDependencyGraphs (com.android.build.gradle.internal.dependency.ConfigurationDependencyGraphs)1 com.android.build.gradle.internal.ide.level2 (com.android.build.gradle.internal.ide.level2)1 JavaLibraryImpl (com.android.build.gradle.internal.ide.level2.JavaLibraryImpl)1 GraphItem (com.android.builder.model.level2.GraphItem)1 File (java.io.File)1 ComponentIdentifier (org.gradle.api.artifacts.component.ComponentIdentifier)1 ModuleComponentIdentifier (org.gradle.api.artifacts.component.ModuleComponentIdentifier)1 ProjectComponentIdentifier (org.gradle.api.artifacts.component.ProjectComponentIdentifier)1