Search in sources :

Example 16 with LocalPackage

use of com.android.repository.api.LocalPackage in project android by JetBrains.

the class PatchInstallerUtilTest method noLatestPatcher.

@Test
public void noLatestPatcher() throws Exception {
    List<LocalPackage> local = ImmutableList.of(new FakeLocalPackage("foo"));
    RepositoryPackages packages = new RepositoryPackages(local, ImmutableList.of());
    FakeRepoManager mgr = new FakeRepoManager(new File("/sdk"), packages);
    LocalPackage patcher = PatchInstallerUtil.getLatestPatcher(mgr);
    assertNull(patcher);
}
Also used : FakeLocalPackage(com.android.repository.testframework.FakePackage.FakeLocalPackage) LocalPackage(com.android.repository.api.LocalPackage) FakeLocalPackage(com.android.repository.testframework.FakePackage.FakeLocalPackage) RepositoryPackages(com.android.repository.impl.meta.RepositoryPackages) FakeRepoManager(com.android.repository.testframework.FakeRepoManager) File(java.io.File) Test(org.junit.Test)

Aggregations

LocalPackage (com.android.repository.api.LocalPackage)16 FakeLocalPackage (com.android.repository.testframework.FakePackage.FakeLocalPackage)7 Test (org.junit.Test)7 StudioLoggerProgressIndicator (com.android.tools.idea.sdk.progress.StudioLoggerProgressIndicator)6 File (java.io.File)6 RepositoryPackages (com.android.repository.impl.meta.RepositoryPackages)5 Revision (com.android.repository.Revision)4 FakeRepoManager (com.android.repository.testframework.FakeRepoManager)4 ProgressIndicator (com.android.repository.api.ProgressIndicator)3 AndroidSdkHandler (com.android.sdklib.repository.AndroidSdkHandler)3 RemotePackage (com.android.repository.api.RemotePackage)2 FakeDependency (com.android.repository.testframework.FakeDependency)2 FakeRemotePackage (com.android.repository.testframework.FakePackage.FakeRemotePackage)2 VirtualFile (com.intellij.openapi.vfs.VirtualFile)2 NotNull (org.jetbrains.annotations.NotNull)2 Nullable (org.jetbrains.annotations.Nullable)2 VisibleForTesting (com.android.annotations.VisibleForTesting)1 RepoManager (com.android.repository.api.RepoManager)1 TypeDetails (com.android.repository.impl.meta.TypeDetails)1 AndroidVersion (com.android.sdklib.AndroidVersion)1