use of com.android.repository.testframework.FakePackage.FakeRemotePackage in project android by JetBrains.
the class PatchInstallerFactoryTest method cantHandleNoSrcOnWindows.
@Test
public void cantHandleNoSrcOnWindows() {
myFileOp.setIsWindows(true);
FakeRemotePackage remote = new FakeRemotePackage("foo");
remote.setRevision(new Revision(2));
myRepositoryPackages.setLocalPkgInfos(ImmutableList.of(PATCHER_4));
myRepositoryPackages.setRemotePkgInfos(ImmutableList.of(remote));
assertFalse(myInstallerFactory.canHandlePackage(remote, myRepoManager, myFileOp));
}
use of com.android.repository.testframework.FakePackage.FakeRemotePackage in project android by JetBrains.
the class PatchInstallerFactoryTest method cantHandleNoPatchOnLinux.
@Test
public void cantHandleNoPatchOnLinux() {
FakeRemotePackage p = new FakeRemotePackage("foo");
myRepositoryPackages.setLocalPkgInfos(ImmutableList.of(PATCHER_4));
myRepositoryPackages.setRemotePkgInfos(ImmutableList.of(p));
assertFalse(myInstallerFactory.canHandlePackage(p, myRepoManager, myFileOp));
}
use of com.android.repository.testframework.FakePackage.FakeRemotePackage in project android by JetBrains.
the class PatchInstallerFactoryTest method canHandleNoPatchOnWindowsWithNewPatcher.
@Test
public void canHandleNoPatchOnWindowsWithNewPatcher() {
myFileOp.setIsWindows(true);
FakeRemotePackage remote = new FakeRemotePackage("foo");
remote.setRevision(new Revision(2));
FakeLocalPackage local = new FakeLocalPackage("foo");
local.setRevision(new Revision(1));
myRepositoryPackages.setLocalPkgInfos(ImmutableList.of(local, PATCHER_4));
myRepositoryPackages.setRemotePkgInfos(ImmutableList.of(remote));
assertTrue(myInstallerFactory.canHandlePackage(remote, myRepoManager, myFileOp));
}
use of com.android.repository.testframework.FakePackage.FakeRemotePackage in project android by JetBrains.
the class PatchInstallerFactoryTest method canHandleOnWindows.
@Test
public void canHandleOnWindows() {
myFileOp.setIsWindows(true);
FakeRemotePackage remote = new FakeRemotePackage("foo");
remote.setRevision(new Revision(2));
remote.setPatchInfo("foo", new Revision(1));
FakeLocalPackage local = new FakeLocalPackage("foo");
local.setRevision(new Revision(1));
myRepositoryPackages.setLocalPkgInfos(ImmutableList.of(local, PATCHER_4));
myRepositoryPackages.setRemotePkgInfos(ImmutableList.of(remote));
assertTrue(myInstallerFactory.canHandlePackage(remote, myRepoManager, myFileOp));
}
use of com.android.repository.testframework.FakePackage.FakeRemotePackage in project android by JetBrains.
the class PatchInstallerFactoryTest method createFallbackInstaller.
@Test
public void createFallbackInstaller() {
FakeRemotePackage remote = new FakeRemotePackage("foo");
remote.setRevision(new Revision(2));
FakeLocalPackage local = new FakeLocalPackage("foo");
local.setRevision(new Revision(1));
myRepositoryPackages.setLocalPkgInfos(ImmutableList.of(local, PATCHER_4));
myRepositoryPackages.setRemotePkgInfos(ImmutableList.of(remote));
Installer installer = myInstallerFactory.createInstaller(remote, myRepoManager, new FakeDownloader(myFileOp), myFileOp);
assertNotNull(installer);
assertFalse(installer instanceof PatchOperation);
}
Aggregations