Package uk.gov.nationalarchives.droid.core.interfaces

Examples of uk.gov.nationalarchives.droid.core.interfaces.ResultHandler


        BinarySignatureIdentifier droid = new BinarySignatureIdentifier();
        SubmissionGateway submissionGateway = new SubmissionGateway();
        submissionGateway.setDroidCore(droid);
       
        droid.setSignatureFile("test_sig_files/DROID_SignatureFile_V26.xml");
        ResultHandler resultHandler = mock(ResultHandler.class);
        submissionGateway.setResultHandler(resultHandler);
        submissionGateway.setProcessArchives(true);
        submissionGateway.setExecutorService(Executors.newFixedThreadPool(2));
       
        SubmissionQueue submissionQueue = mock(SubmissionQueue.class);
View Full Code Here


        SubmissionQueue submissionQueue = mock(SubmissionQueue.class);
        submissionGateway.setSubmissionQueue(submissionQueue);
        submissionGateway.setDroidCore(droid);
       
        droid.setSignatureFile("test_sig_files/DROID_SignatureFile_V26.xml");
        ResultHandler resultHandler = mock(ResultHandler.class);
        submissionGateway.setResultHandler(resultHandler);
        submissionGateway.setExecutorService(Executors.newFixedThreadPool(2));
        try {
            droid.init();
        } catch (SignatureParseException e) {
View Full Code Here

        when(requestFactory.newRequest(any(RequestMetaData.class), any(RequestIdentifier.class)))
            .thenReturn(request);
       
        fileEventHandler.setRequestFactory(requestFactory);
       
        ResultHandler resultHandler = mock(ResultHandler.class);
       
        fileEventHandler.setResultHandler(resultHandler);
       
        SubmissionThrottle throttle = mock(SubmissionThrottle.class);
        fileEventHandler.setSubmissionThrottle(throttle);
View Full Code Here

        final IOException ioException = new IOException("Can't read me!");
        doThrow(ioException).when(request).open(any(InputStream.class));
       
        fileEventHandler.setRequestFactory(requestFactory);
       
        ResultHandler resultHandler = mock(ResultHandler.class);
       
        fileEventHandler.setResultHandler(resultHandler);
       
        SubmissionThrottle throttle = mock(SubmissionThrottle.class);
        fileEventHandler.setSubmissionThrottle(throttle);
View Full Code Here

        AsynchDroid droidCore = mock(AsynchDroid.class);

       
       
        ZipArchiveHandler handler = new ZipArchiveHandler();
        ResultHandler resultHandler = mock(ResultHandler.class);
        when(resultHandler.handleDirectory(any(IdentificationResult.class), eq(parentId),
                 eq(false))).thenReturn(nodeId);
        handler.setResultHandler(resultHandler);

        handler.setFactory(factory);
        handler.setDroidCore(droidCore);
View Full Code Here

        TarArchiveHandler handler = new TarArchiveHandler();
        handler.setFactory(factory);
        handler.setDroidCore(droidCore);
       
        ResultHandler resultHandler = mock(ResultHandler.class);
        when(resultHandler.handleDirectory(any(IdentificationResult.class),
                any(ResourceId.class), anyBoolean())).thenReturn(expectedParentId);
        handler.setResultHandler(resultHandler);
       
        IdentificationRequest originalRequest = mock(IdentificationRequest.class);
        RequestIdentifier originalIdentifier = new RequestIdentifier(file.toURI());
View Full Code Here

TOP

Related Classes of uk.gov.nationalarchives.droid.core.interfaces.ResultHandler

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.