Package org.apache.jackrabbit.vault.packaging

Examples of org.apache.jackrabbit.vault.packaging.PackageManager


    @Test
    public void testCreatePackageForAdd() throws Exception {

        Packaging packaging = mock(Packaging.class);
        PackageManager packageManager = mock(PackageManager.class);
        VaultPackage vaultPackage = mock(VaultPackage.class);
        File file = mock(File.class);
        when(file.getAbsolutePath()).thenReturn("/path/to/file");
        when(vaultPackage.getFile()).thenReturn(file);
        MetaInf inf = mock(MetaInf.class);
        when(vaultPackage.getMetaInf()).thenReturn(inf);
        when(packageManager.assemble(any(Session.class), any(ExportOptions.class), any(File.class))).thenReturn(vaultPackage);
        when(packaging.getPackageManager()).thenReturn(packageManager);

        ResourceResolver resourceResolver = mock(ResourceResolver.class);
        Session session = mock(Session.class);
        Workspace workspace = mock(Workspace.class);
View Full Code Here


    }

    @Test
    public void testReadDummyPackageInternal() throws Exception {
        Packaging packaging = mock(Packaging.class);
        PackageManager packageManager = mock(PackageManager.class);
        when(packaging.getPackageManager()).thenReturn(packageManager);

        ReplicationEventFactory eventFactory = mock(ReplicationEventFactory.class);

        FileVaultReplicationPackageBuilder fileVaultReplicationPackageBuilder = new FileVaultReplicationPackageBuilder(
View Full Code Here

    }

    @Test
    public void testGetPackageInternalWithNonExistingId() throws Exception {
        Packaging packaging = mock(Packaging.class);
        PackageManager packageManager = mock(PackageManager.class);
        when(packaging.getPackageManager()).thenReturn(packageManager);
        ReplicationEventFactory eventFactory = mock(ReplicationEventFactory.class);

        FileVaultReplicationPackageBuilder fileVaultReplicationPackageBuilder = new FileVaultReplicationPackageBuilder(
                packaging, eventFactory);
View Full Code Here

    @Test
    public void testInstallPackageInternal() throws Exception {
        File tempFile = File.createTempFile("testInstallPackageInternal", "txt");
        Packaging packaging = mock(Packaging.class);
        PackageManager packageManager = mock(PackageManager.class);
        VaultPackage vaultPackage = mock(VaultPackage.class);
        when(packageManager.open(tempFile)).thenReturn(vaultPackage);
        when(packaging.getPackageManager()).thenReturn(packageManager);
        ReplicationEventFactory eventFactory = mock(ReplicationEventFactory.class);

        FileVaultReplicationPackageBuilder fileVaultReplicationPackageBuilder = new FileVaultReplicationPackageBuilder(
                packaging, eventFactory);
View Full Code Here

    @Test
    public void testInstallWithCustomImportModeAndACLHandling() throws Exception {
        File tempFile = File.createTempFile("testInstallPackageInternal", "txt");
        Packaging packaging = mock(Packaging.class);
        PackageManager packageManager = mock(PackageManager.class);
        VaultPackage vaultPackage = mock(VaultPackage.class);
        when(packageManager.open(tempFile)).thenReturn(vaultPackage);
        when(packaging.getPackageManager()).thenReturn(packageManager);
        ReplicationEventFactory eventFactory = mock(ReplicationEventFactory.class);

        FileVaultReplicationPackageBuilder fileVaultReplicationPackageBuilder = new FileVaultReplicationPackageBuilder(
                packaging, eventFactory, ImportMode.MERGE.name(), AccessControlHandling.MERGE.name());
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.vault.packaging.PackageManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.